]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/demand.c
Add installcheck targets to keep the autobuilder happy
[ppp.git] / pppd / demand.c
index db5dd90e8d5d9194283dd80ad6385185efa3ddb7..83b1d3729a2e661da3888918ace5383a11836434 100644 (file)
@@ -33,7 +33,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: demand.c,v 1.16 2002/12/04 23:03:32 paulus Exp $"
+#define RCSID  "$Id: demand.c,v 1.18 2004/10/28 00:15:08 paulus Exp $"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -49,9 +49,7 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #ifdef PPP_FILTER
-#include <net/if.h>
-#include <net/bpf.h>
-#include <pcap.h>
+#include <pcap-bpf.h>
 #endif
 
 #include "pppd.h"
@@ -102,8 +100,9 @@ demand_conf()
     fcs = PPP_INITFCS;
 
     netif_set_mtu(0, MIN(lcp_allowoptions[0].mru, PPP_MRU));
-    ppp_send_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);
-    ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);
+    if (ppp_send_config(0, PPP_MRU, (u_int32_t) 0, 0, 0) < 0
+       || ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0) < 0)
+           fatal("Couldn't set up demand-dialled PPP interface: %m");
 
 #ifdef PPP_FILTER
     set_filters(&pass_filter, &active_filter);