summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-05-24 12:30:13 +0100
committerRoy Marples <roy@marples.name>2020-05-24 12:30:13 +0100
commit5aca43094dfbb69053877f3eb45a410157443b0f (patch)
tree2938d9e6a12fe9172736ddaa2581b40853ced895 /src/privsep-root.c
parent00bb5ee068f7a72a516360913c95c639ef7e7518 (diff)
downloaddhcpcd-5aca43094dfbb69053877f3eb45a410157443b0f.tar.xz
Fix prior for BSD
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 198f224c..cba469db 100644
--- a/src/privsep-root.c
+++ b/src/privsep-root.c
@@ -901,8 +901,8 @@ ssize_t
ps_root_ip6forwarding(struct dhcpcd_ctx *ctx, const char *ifname)
{
- if (ps_sendcmd(ctx, ctx->ps_root_fd,
- PS_IP6FORWARDING, 0, ifname, strlen(ifname) + 1) == -1)
+ if (ps_sendcmd(ctx, ctx->ps_root_fd, PS_IP6FORWARDING, 0,
+ ifname, ifname != NULL ? strlen(ifname) + 1 : 0) == -1)
return -1;
return ps_root_readerror(ctx, NULL, 0);
}