]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/demand.c
Remove the requirement that redistributions in binary form reproduce
[ppp.git] / pppd / demand.c
index db5dd90e8d5d9194283dd80ad6385185efa3ddb7..8bf96d02b7ff700b3ac0294c1e0ff0c4b22d7000 100644 (file)
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The name(s) of the authors of this software must not be used to
+ * 2. The name(s) of the authors of this software must not be used to
  *    endorse or promote products derived from this software without
  *    prior written permission.
  *
- * 4. Redistributions of any form whatsoever must retain the following
+ * 3. Redistributions of any form whatsoever must retain the following
  *    acknowledgment:
  *    "This product includes software developed by Paul Mackerras
  *     <paulus@samba.org>".
@@ -33,7 +28,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.19 2004/11/04 10:02:26 paulus Exp $"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -49,9 +44,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 +95,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);