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 | cd3ab837c5449d6638eae9bd686dee513a47b677 (patch) | |
| tree | 6e05c03faad26aaa1dac72c8b53947a19fdc679e | |
| parent | ad4fd2c042a446703c41bd9065534e383d6e2c0c (diff) | |
| download | dhcpcd-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.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; } |
