PPP, sifnpmode() is only useful if on demand is supported, build out if not

We don't support PPP on demand, don't build sifnpmode() which is only
useful for on demand if on demand is not supported.
This commit is contained in:
Sylvain Rochet 2015-04-30 00:06:24 +02:00
parent 1b6d6d0dc0
commit fd53cad208
4 changed files with 12 additions and 0 deletions

View File

@ -462,7 +462,9 @@ int sif6up(ppp_pcb *pcb);
int sif6down (ppp_pcb *pcb);
#endif /* PPP_IPV6_SUPPORT */
#if DEMAND_SUPPORT
int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode);
#endif /* DEMAND_SUPPORt */
void netif_set_mtu(ppp_pcb *pcb, int mtu);
int netif_get_mtu(ppp_pcb *pcb);

View File

@ -2050,7 +2050,9 @@ static void ipcp_up(fsm *f) {
return;
}
#endif
#if DEMAND_SUPPORT
sifnpmode(pcb, PPP_IP, NPMODE_PASS);
#endif /* DEMAND_SUPPORT */
#if 0 /* UNUSED */
/* assign a default route through the interface if required */
@ -2147,7 +2149,9 @@ static void ipcp_down(fsm *f) {
} else
#endif /* DEMAND_SUPPORT */
{
#if DEMAND_SUPPORT
sifnpmode(pcb, PPP_IP, NPMODE_DROP);
#endif /* DEMAND_SUPPORT */
sifdown(pcb);
ipcp_clear_addrs(pcb, go->ouraddr,
ho->hisaddr, 0);

View File

@ -1240,7 +1240,9 @@ static void ipv6cp_up(fsm *f) {
ipv6cp_close(f->pcb, "Interface configuration failed");
return;
}
#if DEMAND_SUPPORT
sifnpmode(f->pcb, PPP_IPV6, NPMODE_PASS);
#endif /* DEMAND_SUPPORT */
ppp_notice("local LL address %s", llv6_ntoa(go->ourid));
ppp_notice("remote LL address %s", llv6_ntoa(ho->hisid));
@ -1295,7 +1297,9 @@ static void ipv6cp_down(fsm *f) {
} else
#endif /* DEMAND_SUPPORT */
{
#if DEMAND_SUPPORT
sifnpmode(f->pcb, PPP_IPV6, NPMODE_DROP);
#endif /* DEMAND_SUPPORT */
ipv6cp_clear_addrs(f->pcb,
go->ourid,
ho->hisid);

View File

@ -1265,6 +1265,7 @@ int sif6down(ppp_pcb *pcb) {
}
#endif /* PPP_IPV6_SUPPORT */
#if DEMAND_SUPPORT
/*
* sifnpmode - Set the mode for handling packets for a given NP.
*/
@ -1274,6 +1275,7 @@ int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode) {
LWIP_UNUSED_ARG(mode);
return 0;
}
#endif /* DEMAND_SUPPORT */
/*
* netif_set_mtu - set the MTU on the PPP network interface.