X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fdemand.c;h=395a598a9ea56b8c95d256d47eeacafc6081d920;hb=39c06d616dd4c9443ed390969e58cd53ca1e314d;hp=db5dd90e8d5d9194283dd80ad6385185efa3ddb7;hpb=f53a48eb9d74db3c71938e114b7f489c339bc003;p=ppp.git diff --git a/pppd/demand.c b/pppd/demand.c index db5dd90..395a598 100644 --- a/pppd/demand.c +++ b/pppd/demand.c @@ -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.17 2003/03/03 05:11:45 paulus Exp $" #include #include @@ -102,8 +102,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);