#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
#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>
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);
}