]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Send a RELEASE if the link is up
authorRoy Marples <roy@marples.name>
Thu, 4 Apr 2013 23:30:14 +0000 (23:30 +0000)
committerRoy Marples <roy@marples.name>
Thu, 4 Apr 2013 23:30:14 +0000 (23:30 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index aabd53de0c17833ead38d510fd2182a8599ba2ef..f59a80e1d98f816ff73202984da0072d68833b48 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1921,7 +1921,8 @@ dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
        state = D6_STATE(ifp);
        if (state) {
                if (ifp->options->options & DHCPCD_RELEASE) {
-                       dhcp6_startrelease(ifp);
+                       if (ifp->carrier != LINK_DOWN)
+                               dhcp6_startrelease(ifp);
                        unlink(state->leasefile);
                }
                dhcp6_freedrop_addrs(ifp, drop);