diff options
| author | Roy Marples <roy@marples.name> | 2020-09-19 14:40:50 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-09-19 14:40:50 +0100 |
| commit | 1efd31813fde826b000fbc40234ea89979ef73a8 (patch) | |
| tree | ff8f26cb8e5a13f34ebc319fe107e0ce4d77afbe /src/if.c | |
| parent | 11963d2088a68a18ea61f27584a9339cd0292cac (diff) | |
| download | dhcpcd-1efd31813fde826b000fbc40234ea89979ef73a8.tar.xz | |
Linux: detect network namespace and deny udev in one
udev says whether an interface name is stable or not.
In a network namespace, udev claims the interface does not exist.
This makes sense because udev only operates in the root namespace.
As such disable udev in a network namespace.
While here correctly spell initialise.
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -519,8 +519,11 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, #ifdef PLUGIN_DEV /* Ensure that the interface name has settled */ - if (!dev_initialized(ctx, spec.devname)) + if (!dev_initialised(ctx, spec.devname)) { + logdebugx("%s: waiting for interface to initialise", + spec.devname); continue; + } #endif if (if_vimaster(ctx, spec.devname) == 1) { |
