diff options
| author | Roy Marples <roy@marples.name> | 2018-04-16 09:23:30 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2018-04-16 09:23:30 +0000 |
| commit | ef88444119cbf807995fa3cc9a062daafe39b8ee (patch) | |
| tree | 6e05c03faad26aaa1dac72c8b53947a19fdc679e | |
| parent | 8827e45fedbddc7e7060c47a92e9d9820b5e83c0 (diff) | |
| download | dhcpcd-ef88444119cbf807995fa3cc9a062daafe39b8ee.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.c | 5 |
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; } |
