mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-21 15:46:52 +08:00
PPP, from PPPD upstream, separate IPv6 handling for sifup/sifdown
The current code is buggy regarding handling of link state when using both IPCP and IPv6CP: if IPv6CP has been set up and if during IPCP negociation, ipcp_up() fails, it will incorrectly take the interface down. The simple solution here is to change the platform code to do the same as on Solaris: separate IPv6CP up/down state handling with sif6up() and sif6down(), so that we really know when the interface is allowed to go down. (Based from pppd commit b04d2dc6df5c6b5650fea44250d58757ee3dac4a)
This commit is contained in:
@@ -379,6 +379,11 @@ struct ppp_pcb_s {
|
||||
|
||||
/* flags */
|
||||
unsigned int if_up :1; /* True when the interface is up. */
|
||||
#if PPP_IPV6_SUPPORT
|
||||
unsigned int if6_up :1; /* True when the IPv6 interface is up. */
|
||||
#else
|
||||
unsigned int :1; /* 1 bit of padding */
|
||||
#endif /* PPP_IPV6_SUPPORT */
|
||||
unsigned int pcomp :1; /* Does peer accept protocol compression? */
|
||||
unsigned int accomp :1; /* Does peer accept addr/ctl compression? */
|
||||
unsigned int proxy_arp_set :1; /* Have created proxy arp entry */
|
||||
@@ -396,7 +401,7 @@ struct ppp_pcb_s {
|
||||
#else
|
||||
unsigned int :1; /* 1 bit of padding */
|
||||
#endif /* PPPOS_SUPPORT && VJ_SUPPORT */
|
||||
unsigned int :6; /* 5 bits of padding to round out to 16 bits */
|
||||
unsigned int :5; /* 5 bits of padding to round out to 16 bits */
|
||||
|
||||
#if PPPOS_SUPPORT
|
||||
/* FIXME: there is probably one superfluous */
|
||||
|
||||
@@ -406,6 +406,11 @@ int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2);
|
||||
int sifup(ppp_pcb *pcb);
|
||||
int sifdown (ppp_pcb *pcb);
|
||||
|
||||
#if PPP_IPV6_SUPPORT
|
||||
int sif6up(ppp_pcb *pcb);
|
||||
int sif6down (ppp_pcb *pcb);
|
||||
#endif /* PPP_IPV6_SUPPORT */
|
||||
|
||||
int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode);
|
||||
|
||||
void netif_set_mtu(ppp_pcb *pcb, int mtu);
|
||||
|
||||
Reference in New Issue
Block a user