mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 09:03:49 +08:00
PPP, IPCP: fix reset state before reconnecting
Commit7df5496e7brevealed a regression introduced in commit5a71509353which broke IPCP reset state. ask_for_local was set to 0 if ouraddr initial value is 0, if ask_for_local was false go->ouraddr was cleared in reset callback, commit5a71509353breaks it by removing this clearing. This regression was silent because the whole ppp pcb runtime data was cleared before reconnecting until commit7df5496e7bwhich removed this giant clearing. Fix it by reintroducing ask_for_local boolean value, with proper initial value following what unused function ip_check_options do. Fixes:7df5496e7b("PPP, rework initial/reconnect cleanup") Fixes:5a71509353("PPP, CORE, IPCP: removed useless ask_for_local boolean")
This commit is contained in:
@@ -728,13 +728,8 @@ static void ipcp_resetci(fsm *f) {
|
||||
wo->req_dns1 = wo->req_dns2 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */
|
||||
#endif /* LWIP_DNS */
|
||||
*go = *wo;
|
||||
#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)
|
||||
if (!pcb->ask_for_local)
|
||||
go->ouraddr = 0;
|
||||
#endif /* UNUSED */
|
||||
#if 0 /* UNUSED */
|
||||
if (ip_choose_hook) {
|
||||
ip_choose_hook(&wo->hisaddr);
|
||||
|
||||
Reference in New Issue
Block a user