summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-09-19 14:40:50 +0100
committerRoy Marples <roy@marples.name>2020-09-19 14:40:50 +0100
commit1efd31813fde826b000fbc40234ea89979ef73a8 (patch)
treeff8f26cb8e5a13f34ebc319fe107e0ce4d77afbe /src/privsep-root.c
parent11963d2088a68a18ea61f27584a9339cd0292cac (diff)
downloaddhcpcd-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/privsep-root.c')
-rw-r--r--src/privsep-root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/privsep-root.c b/src/privsep-root.c
index 1a438b67..92faec4c 100644
--- a/src/privsep-root.c
+++ b/src/privsep-root.c
@@ -570,7 +570,7 @@ ps_root_recvmsgcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
#endif
#ifdef PLUGIN_DEV
case PS_DEV_INITTED:
- err = dev_initialized(ctx, data);
+ err = dev_initialised(ctx, data);
break;
case PS_DEV_LISTENING:
err = dev_listening(ctx);
@@ -989,7 +989,7 @@ ps_root_getauthrdm(struct dhcpcd_ctx *ctx, uint64_t *rdm)
#ifdef PLUGIN_DEV
int
-ps_root_dev_initialized(struct dhcpcd_ctx *ctx, const char *ifname)
+ps_root_dev_initialised(struct dhcpcd_ctx *ctx, const char *ifname)
{
if (ps_sendcmd(ctx, ctx->ps_root_fd, PS_DEV_INITTED, 0,