PPP, CORE, IPCP: removed useless ask_for_local boolean

We don't need ask_for_local boolean, this is only useful for setup which
can determine the local IP address from the system hostname, which is
probably meaningless for embedded devices (and probably any devices).

It was actually only set by ip_check_options() which is commented out in
lwIP because we don't parse a config file nor check PPP configuration
(user is responsible about writing a configuration which is logical ;-).
Furthermore ask_for_local boolean never set actually had the wrong
default for PPP server setups.
This commit is contained in:
Sylvain Rochet 2015-02-27 22:39:42 +01:00
parent a310bc19a7
commit 5a71509353
2 changed files with 7 additions and 3 deletions

View File

@ -344,9 +344,8 @@ struct ppp_pcb_s {
#else
unsigned int :2; /* 2 bit of padding */
#endif /* PPP_IPV6_SUPPORT */
unsigned int ask_for_local :1; /* request our address from peer */
unsigned int lcp_echo_timer_running :1; /* set if a timer is running */
unsigned int :5; /* 5 bits of padding to round out to 16 bits */
unsigned int :6; /* 6 bits of padding to round out to 16 bits */
u32_t last_xmit; /* Time of last transmission. */

View File

@ -721,8 +721,13 @@ static void ipcp_resetci(fsm *f) {
wo->req_dns1 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */
wo->req_dns2 = pcb->settings.usepeerdns;
*go = *wo;
if (!pcb->ask_for_local)
#if 0 /* UNUSED */
/* We don't need ask_for_local, this is only useful for setup which
* can determine the local IP address from the system hostname.
*/
if (!ask_for_local)
go->ouraddr = 0;
#endif /* UNUSED */
#if 0 /* UNUSED */
if (ip_choose_hook) {
ip_choose_hook(&wo->hisaddr);