diff --git a/src/netif/ppp/demand.c b/src/netif/ppp/demand.c index 872fe4d5..709e5ea1 100644 --- a/src/netif/ppp/demand.c +++ b/src/netif/ppp/demand.c @@ -86,8 +86,8 @@ demand_conf() const struct protent *protp; /* framemax = lcp_allowoptions[0].mru; - if (framemax < PPP_MRU) */ - framemax = PPP_MRU; + if (framemax < PPP_DEFMRU) */ + framemax = PPP_DEFMRU; framemax += PPP_HDRLEN + PPP_FCSLEN; frame = malloc(framemax); if (frame == NULL) @@ -98,9 +98,9 @@ demand_conf() flush_flag = 0; fcs = PPP_INITFCS; - ppp_netif_set_mtu(pcb, LWIP_MIN(lcp_allowoptions[0].mru, PPP_MRU)); - if (ppp_send_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0) + ppp_netif_set_mtu(pcb, LWIP_MIN(lcp_allowoptions[0].mru, PPP_DEFMRU)); + if (ppp_send_config(pcb, PPP_DEFMRU, (u32_t) 0, 0, 0) < 0 + || ppp_recv_config(pcb, PPP_DEFMRU, (u32_t) 0, 0, 0) < 0) fatal("Couldn't set up demand-dialled PPP interface: %m"); #ifdef PPP_FILTER diff --git a/src/netif/ppp/lcp.c b/src/netif/ppp/lcp.c index f6dd4582..eefdd314 100644 --- a/src/netif/ppp/lcp.c +++ b/src/netif/ppp/lcp.c @@ -462,11 +462,11 @@ void lcp_lowerup(ppp_pcb *pcb) { * but accept A/C and protocol compressed packets * if we are going to ask for A/C and protocol compression. */ - if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff), + if (ppp_send_config(pcb, PPP_DEFMRU, 0xffffffff, 0, 0) < 0 + || ppp_recv_config(pcb, PPP_DEFMRU, (pcb->settings.lax_recv? 0: 0xffffffff), wo->neg_pcompression, wo->neg_accompression) < 0) return; - pcb->peer_mru = PPP_MRU; + pcb->peer_mru = PPP_DEFMRU; if (pcb->settings.listen_time != 0) { f->flags |= DELAYED_UP; @@ -757,7 +757,7 @@ static void lcp_resetci(fsm *f) { #endif /* HAVE_MULTILINK */ if (pcb->settings.noendpoint) ao->neg_endpoint = 0; - pcb->peer_mru = PPP_MRU; + pcb->peer_mru = PPP_DEFMRU; #if 0 /* UNUSED */ auth_reset(pcb); #endif /* UNUSED */ @@ -2309,8 +2309,8 @@ static void lcp_up(fsm *f) { * the interface MTU is set to the lowest of that, the * MTU we want to use, and our link MRU. */ - mtu = ho->neg_mru? ho->mru: PPP_MRU; - mru = go->neg_mru? LWIP_MAX(wo->mru, go->mru): PPP_MRU; + mtu = ho->neg_mru? ho->mru: PPP_DEFMRU; + mru = go->neg_mru? LWIP_MAX(wo->mru, go->mru): PPP_DEFMRU; #ifdef HAVE_MULTILINK if (!(multilink && go->neg_mrru && ho->neg_mrru)) #endif /* HAVE_MULTILINK */ @@ -2344,11 +2344,11 @@ static void lcp_down(fsm *f) { link_down(pcb); - ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0); - ppp_recv_config(pcb, PPP_MRU, + ppp_send_config(pcb, PPP_DEFMRU, 0xffffffff, 0, 0); + ppp_recv_config(pcb, PPP_DEFMRU, (go->neg_asyncmap? go->asyncmap: 0xffffffff), go->neg_pcompression, go->neg_accompression); - pcb->peer_mru = PPP_MRU; + pcb->peer_mru = PPP_DEFMRU; } diff --git a/src/netif/ppp/multilink.c b/src/netif/ppp/multilink.c index 31df7642..795d6b50 100644 --- a/src/netif/ppp/multilink.c +++ b/src/netif/ppp/multilink.c @@ -142,7 +142,7 @@ mp_join_bundle() /* not doing multilink */ if (go->neg_mrru) notice("oops, multilink negotiated only for receive"); - mtu = ho->neg_mru? ho->mru: PPP_MRU; + mtu = ho->neg_mru? ho->mru: PPP_DEFMRU; if (mtu > ao->mru) mtu = ao->mru; if (demand) {