From: Roy Marples Date: Mon, 16 Apr 2018 09:23:30 +0000 (+0000) Subject: Linux: If listening to dev manager, let it remove interfaces X-Git-Tag: v7.0.4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef88444119cbf807995fa3cc9a062daafe39b8ee;p=thirdparty%2Fdhcpcd.git Linux: If listening to dev manager, let it remove interfaces Otherwise we race with the kernel removing and the dev manager re-adding it. --- diff --git a/src/if-linux.c b/src/if-linux.c index 21e333bf..99bacfab 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -753,7 +753,10 @@ link_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, } if (nlm->nlmsg_type == RTM_DELLINK) { - dhcpcd_handleinterface(ctx, -1, ifn); + /* If are listening to a dev manager, let that remove + * the interface rather than the kernel. */ + if (dev_listening(ctx) < 1) + dhcpcd_handleinterface(ctx, -1, ifn); return 0; }