Mercurial > hg > dhcpcd
changeset 2475:023d080fb9aa draft
When dropping, move the new config onto the old before running the script.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 06 May 2014 14:39:31 +0000 |
| parents | f27dd8bf4885 |
| children | 2d2f728a69dc |
| files | dhcp6.c |
| diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcp6.c Tue May 06 12:42:39 2014 +0000 +++ b/dhcp6.c Tue May 06 14:39:31 2014 +0000 @@ -2710,7 +2710,10 @@ 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 @@ 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; }
