summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-04-16 09:23:30 +0000
committerRoy Marples <roy@marples.name>2018-04-16 09:23:30 +0000
commitcd3ab837c5449d6638eae9bd686dee513a47b677 (patch)
tree6e05c03faad26aaa1dac72c8b53947a19fdc679e
parentad4fd2c042a446703c41bd9065534e383d6e2c0c (diff)
downloaddhcpcd-cd3ab837c5449d6638eae9bd686dee513a47b677.tar.xz
Linux: If listening to dev manager, let it remove interfaces
Otherwise we race with the kernel removing and the dev manager re-adding it.
-rw-r--r--src/if-linux.c5
1 files changed, 4 insertions, 1 deletions
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;
}