mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-23 18:14:09 +08:00
When dropping, move the new config onto the old before running the script.
This commit is contained in:
parent
26ede0ceb8
commit
8d442d9eac
8
dhcp6.c
8
dhcp6.c
@ -2710,7 +2710,10 @@ dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
|
||||
unlink(state->leasefile);
|
||||
}
|
||||
dhcp6_freedrop_addrs(ifp, drop, NULL);
|
||||
if (drop && state->new &&
|
||||
free(state->old);
|
||||
state->old = state->new;
|
||||
state->new = NULL;
|
||||
if (drop && state->old &&
|
||||
(options &
|
||||
(DHCPCD_EXITING | DHCPCD_PERSISTENT)) !=
|
||||
(DHCPCD_EXITING | DHCPCD_PERSISTENT))
|
||||
@ -2719,10 +2722,9 @@ dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
|
||||
reason = "STOP6";
|
||||
script_runreason(ifp, reason);
|
||||
}
|
||||
free(state->old);
|
||||
free(state->send);
|
||||
free(state->recv);
|
||||
free(state->new);
|
||||
free(state->old);
|
||||
free(state);
|
||||
ifp->if_data[IF_DATA_DHCP6] = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user