diff options
| author | Roy Marples <roy@marples.name> | 2020-05-24 12:30:13 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-24 12:30:13 +0100 |
| commit | 5aca43094dfbb69053877f3eb45a410157443b0f (patch) | |
| tree | 2938d9e6a12fe9172736ddaa2581b40853ced895 | |
| parent | 00bb5ee068f7a72a516360913c95c639ef7e7518 (diff) | |
| download | dhcpcd-5aca43094dfbb69053877f3eb45a410157443b0f.tar.xz | |
Fix prior for BSD
| -rw-r--r-- | src/ipv6.c | 5 | ||||
| -rw-r--r-- | src/privsep-bsd.c | 6 | ||||
| -rw-r--r-- | src/privsep-root.c | 4 |
3 files changed, 10 insertions, 5 deletions
@@ -1093,11 +1093,10 @@ ipv6_anyglobal(struct interface *sifp) #if defined(PRIVSEP) && defined(HAVE_PLEDGE) if (IN_PRIVSEP(sifp->ctx)) - forwarding = ps_root_ip6forwarding(sifp->ctx) == 1; + forwarding = ps_root_ip6forwarding(sifp->ctx, NULL) == 1; else -#else - forwarding = ip6_forwarding(NULL) == 1; #endif + forwarding = ip6_forwarding(NULL) == 1; #endif diff --git a/src/privsep-bsd.c b/src/privsep-bsd.c index bf17ce9f..aa63bcd4 100644 --- a/src/privsep-bsd.c +++ b/src/privsep-bsd.c @@ -33,6 +33,12 @@ #include <netinet/in.h> #include <netinet6/in6_var.h> #include <netinet6/nd6.h> +#ifdef __DragonFly__ +# include <netproto/802_11/ieee80211_ioctl.h> +#else +# include <net80211/ieee80211.h> +# include <net80211/ieee80211_ioctl.h> +#endif #include <errno.h> #include <string.h> 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); } |
