]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix prior for BSD
authorRoy Marples <roy@marples.name>
Sun, 24 May 2020 11:30:13 +0000 (12:30 +0100)
committerRoy Marples <roy@marples.name>
Sun, 24 May 2020 11:30:13 +0000 (12:30 +0100)
src/ipv6.c
src/privsep-bsd.c
src/privsep-root.c

index 71b51bc785e0f150342c6921c03d8b75d57b6074..ef4b7164627c7d8772f50455688aa5812764abe0 100644 (file)
@@ -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
 
 
index bf17ce9f1db553f9a4c2241a60759780cefd53a4..aa63bcd453a37c69bf8a388d8434aef68c224b5b 100644 (file)
 #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>
index 198f224ce2df37daa158dae58b7852958987688e..cba469db9f86fa05545cbc933051e020bdbf330a 100644 (file)
@@ -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);
 }