]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only release the DHCPv6 lease when dropping it.
authorRoy Marples <roy@marples.name>
Thu, 1 Jan 2015 20:49:10 +0000 (20:49 +0000)
committerRoy Marples <roy@marples.name>
Thu, 1 Jan 2015 20:49:10 +0000 (20:49 +0000)
Fixes [bc15b90f7a]

dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 5b24c6b779704e7c519afebfd99ff1b1a2fbaa44..a3905722632da8ca2cdd84080261154d7767fbc9 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -3289,7 +3289,7 @@ dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
        state = D6_STATE(ifp);
        if (state) {
                dhcp_auth_reset(&state->auth);
-               if (options & DHCPCD_RELEASE) {
+               if (drop && options & DHCPCD_RELEASE) {
                        if (ifp->carrier == LINK_UP)
                                dhcp6_startrelease(ifp);
                        unlink(state->leasefile);