]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Preserve lo0 routes if the global default is to persist.
authorRoy Marples <roy@marples.name>
Mon, 9 May 2016 08:22:38 +0000 (08:22 +0000)
committerRoy Marples <roy@marples.name>
Mon, 9 May 2016 08:22:38 +0000 (08:22 +0000)
dhcp6.c
dhcpcd.c

diff --git a/dhcp6.c b/dhcp6.c
index 6c15e86f07a09fe24c50acc4bb27ae67f6165f73..239350c3709dc3fc3b2c074bbfa2976f7815b598 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -3341,7 +3341,7 @@ dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
        if (ifp->options)
                options = ifp->options->options;
        else
-               options = 0;
+               options = ifp->ctx->options;
        dropdele = (options & (DHCPCD_STOPPING | DHCPCD_RELEASE) &&
            (options & DHCPCD_NODROP) != DHCPCD_NODROP);
 
index 68b80537388103720f17477ac96d77a2b16d5a4a..bccc24964163fa5678193a6551c7693e59f4858d 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1172,6 +1172,7 @@ stop_all_interfaces(struct dhcpcd_ctx *ctx, unsigned long long opts)
 {
        struct interface *ifp;
 
+       ctx->options |= DHCPCD_EXITING;
        /* Drop the last interface first */
        TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) {
                if (ifp->options) {