PPP, IPCP, removed proxy ARP support

This commit is contained in:
Sylvain Rochet 2015-03-08 23:00:27 +01:00
parent 0e2ea94f5e
commit 99bcce7892
5 changed files with 18 additions and 4 deletions

View File

@ -87,7 +87,9 @@ typedef struct ipcp_options {
unsigned int default_route :1; /* Assign default route through interface? */
unsigned int replace_default_route :1; /* Replace default route through interface? */
#endif /* UNUSED */
#if 0 /* UNUSED - PROXY ARP */
unsigned int proxy_arp :1; /* Make proxy ARP entry for peer? */
#endif /* UNUSED - PROXY ARP */
#if VJ_SUPPORT
unsigned int neg_vj :1; /* Van Jacobson Compression? */
unsigned int old_vj :1; /* use old (short) form of VJ option? */
@ -103,7 +105,7 @@ typedef struct ipcp_options {
#else
unsigned int :2; /* 2 bits of padding */
#endif /* LWIP_DNS */
unsigned int :5; /* 3 bits of padding to round out to 16 bits */
unsigned int :6; /* 6 bits of padding to round out to 16 bits */
u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
#if LWIP_DNS

View File

@ -334,7 +334,9 @@ struct ppp_pcb_s {
unsigned int ipcp_is_open :1; /* haven't called np_finished() */
unsigned int ipcp_is_up :1; /* have called ipcp_up() */
unsigned int if4_up :1; /* True when the IPv4 interface is up. */
#if 0 /* UNUSED - PROXY ARP */
unsigned int proxy_arp_set :1; /* Have created proxy arp entry */
#endif /* UNUSED - PROXY ARP */
#if VJ_SUPPORT
unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */
#else
@ -350,7 +352,7 @@ struct ppp_pcb_s {
unsigned int :2; /* 2 bit of padding */
#endif /* PPP_IPV6_SUPPORT */
unsigned int lcp_echo_timer_running :1; /* set if a timer is running */
unsigned int :6; /* 6 bits of padding to round out to 16 bits */
unsigned int :7; /* 7 bits of padding to round out to 16 bits */
u32_t last_xmit; /* Time of last transmission. */

View File

@ -445,8 +445,10 @@ int ppp_recv_config(ppp_pcb *pcb, int mru, u32_t accm, int pcomp, int accomp);
#if PPP_IPV4_SUPPORT
int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t netmask);
int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr);
#if 0 /* UNUSED - PROXY ARP */
int sifproxyarp(ppp_pcb *pcb, u32_t his_adr);
int cifproxyarp(ppp_pcb *pcb, u32_t his_adr);
#endif /* UNUSED - PROXY ARP */
#if LWIP_DNS
int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2);
int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2);

View File

@ -1869,9 +1869,11 @@ ip_demand_conf(u)
wo->replace_default_route))
default_route_set[u] = 1;
#endif /* UNUSED */
#if 0 /* UNUSED - PROXY ARP */
if (wo->proxy_arp)
if (sifproxyarp(pcb, wo->hisaddr))
proxy_arp_set[u] = 1;
#endif /* UNUSED - PROXY ARP */
ppp_notice("local IP address %I", wo->ouraddr);
if (wo->hisaddr)
@ -1999,10 +2001,12 @@ static void ipcp_up(fsm *f) {
wo->replace_default_route))
default_route_set[f->unit] = 1;
#if 0 /* UNUSED - PROXY ARP */
/* Make a proxy ARP entry if requested. */
if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp)
if (sifproxyarp(pcb, ho->hisaddr))
proxy_arp_set[f->unit] = 1;
#endif /* UNUSED - PROXY ARP */
}
demand_rexmit(PPP_IP,go->ouraddr);
@ -2054,10 +2058,12 @@ static void ipcp_up(fsm *f) {
pcb->default_route_set = 1;
#endif /* UNUSED */
#if 0 /* UNUSED - PROXY ARP */
/* Make a proxy ARP entry if requested. */
if (ho->hisaddr != 0 && wo->proxy_arp)
if (sifproxyarp(pcb, ho->hisaddr))
pcb->proxy_arp_set = 1;
#endif /* UNUSED - PROXY ARP */
wo->ouraddr = go->ouraddr;
@ -2157,10 +2163,12 @@ static void ipcp_down(fsm *f) {
static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t replacedefaultroute) {
LWIP_UNUSED_ARG(replacedefaultroute);
#if 0 /* UNUSED - PROXY ARP */
if (pcb->proxy_arp_set) {
cifproxyarp(pcb, hisaddr);
pcb->proxy_arp_set = 0;
}
#endif /* UNUSED - PROXY ARP */
#if 0 /* UNUSED */
/* If replacedefaultroute, sifdefaultroute will be called soon
* with replacedefaultroute set and that will overwrite the current

View File

@ -884,6 +884,7 @@ int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr) {
return 1;
}
#if 0 /* UNUSED - PROXY ARP */
/********************************************************************
*
* sifproxyarp - Make a proxy ARP entry for the peer.
@ -892,7 +893,6 @@ int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr) {
int sifproxyarp(ppp_pcb *pcb, u32_t his_adr) {
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(his_adr);
/* FIXME: do we really need that in IPCP ? */
return 0;
}
@ -904,9 +904,9 @@ int sifproxyarp(ppp_pcb *pcb, u32_t his_adr) {
int cifproxyarp(ppp_pcb *pcb, u32_t his_adr) {
LWIP_UNUSED_ARG(pcb);
LWIP_UNUSED_ARG(his_adr);
/* FIXME: do we really need that in IPCP ? */
return 0;
}
#endif /* UNUSED - PROXY ARP */
#if LWIP_DNS
/*