# HG changeset patch # User Roy Marples # Date 1590319813 -3600 # Node ID 1e7ce40ed871124d9b874bf8cb1d46c3257400ea # Parent f168a25dd330bf6cf15cdb427e34babadba8b69f Fix prior for BSD diff -r f168a25dd330 -r 1e7ce40ed871 src/ipv6.c --- a/src/ipv6.c Sun May 24 11:49:58 2020 +0100 +++ b/src/ipv6.c Sun May 24 12:30:13 2020 +0100 @@ -1093,12 +1093,11 @@ #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 +#endif forwarding = ip6_forwarding(NULL) == 1; #endif -#endif TAILQ_FOREACH(ifp, sifp->ctx->ifaces, next) { diff -r f168a25dd330 -r 1e7ce40ed871 src/privsep-bsd.c --- a/src/privsep-bsd.c Sun May 24 11:49:58 2020 +0100 +++ b/src/privsep-bsd.c Sun May 24 12:30:13 2020 +0100 @@ -33,6 +33,12 @@ #include #include #include +#ifdef __DragonFly__ +# include +#else +# include +# include +#endif #include #include diff -r f168a25dd330 -r 1e7ce40ed871 src/privsep-root.c --- a/src/privsep-root.c Sun May 24 11:49:58 2020 +0100 +++ b/src/privsep-root.c Sun May 24 12:30:13 2020 +0100 @@ -901,8 +901,8 @@ 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); }