Mercurial > hg > dhcpcd
changeset 5263:1e7ce40ed871 draft
Fix prior for BSD
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 24 May 2020 12:30:13 +0100 |
| parents | f168a25dd330 |
| children | 868ac20cdbad |
| files | src/ipv6.c src/privsep-bsd.c src/privsep-root.c |
| diffstat | 3 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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 <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>
--- 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); }
