diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index 22ed321c..66e711df 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -349,10 +349,6 @@ struct ppp_pcb_s { #endif /* VJ_SUPPORT */ #endif /* PPPOS_SUPPORT */ - /* FIXME: maybe we should cleanup one of those MTU variables */ - u16_t mtu; /* Peer's mru */ - u16_t peer_mru; /* currently negotiated peer MRU */ - u32_t last_xmit; /* Time of last transmission. */ struct ppp_addrs addrs; /* PPP addresses */ @@ -388,6 +384,7 @@ struct ppp_pcb_s { lcp_options lcp_hisoptions; /* Options that we ack'd */ u8_t lcp_echos_pending; /* Number of outstanding echo msgs */ u8_t lcp_echo_number; /* ID number of next echo frame */ + u16_t peer_mru; /* currently negotiated peer MRU */ fsm ipcp_fsm; /* IPCP fsm structure */ ipcp_options ipcp_wantoptions; /* Options that we want to request */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index d046d188..fccda18f 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -2219,7 +2219,6 @@ int sifup(ppp_pcb *pcb) { netif_ip6_addr_set_state(&pcb->netif, 0, IP6_ADDR_PREFERRED); #endif /* PPP_IPV6_SUPPORT */ - pcb->netif.mtu = netif_get_mtu(pcb); netif_set_up(&pcb->netif); pcb->if_up = 1; pcb->err_code = PPPERR_NONE; @@ -2261,7 +2260,7 @@ int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode) { */ void netif_set_mtu(ppp_pcb *pcb, int mtu) { - pcb->mtu = mtu; + pcb->netif.mtu = mtu; } /* @@ -2269,7 +2268,7 @@ void netif_set_mtu(ppp_pcb *pcb, int mtu) { */ int netif_get_mtu(ppp_pcb *pcb) { - return pcb->mtu; + return pcb->netif.mtu; } /********************************************************************