From: Roy Marples Date: Mon, 9 May 2016 08:22:38 +0000 (+0000) Subject: Preserve lo0 routes if the global default is to persist. X-Git-Tag: v6.11.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bbedd2c411e7cc8dded57d8a4a4d8e7c4fc4296;p=thirdparty%2Fdhcpcd.git Preserve lo0 routes if the global default is to persist. --- diff --git a/dhcp6.c b/dhcp6.c index 6c15e86f..239350c3 100644 --- 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); diff --git a/dhcpcd.c b/dhcpcd.c index 68b80537..bccc2496 100644 --- 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) {