From f97dde9d742cac607f437681ad79e90de1aaa76a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 17 Jun 2020 09:42:32 +0100 Subject: [PATCH] inet6: No flags on the prefix means the prefix is via the router Fixes a minor regression from prior. --- src/ipv6nd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/ipv6nd.c b/src/ipv6nd.c index 5c4bd410..009792dc 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -1339,7 +1339,9 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, continue; } - flags = 0; + flags = IPV6_AF_RAPFX; + /* If no flags are set, that means the prefix is + * available via the router. */ if (pi.nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_ONLINK) flags |= IPV6_AF_ONLINK; if (pi.nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_AUTO && @@ -1348,20 +1350,12 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, flags |= IPV6_AF_AUTOCONF; if (pi.nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_ROUTER) flags |= IPV6_AF_ROUTER; - if (flags == 0) { - logmessage(loglevel, - "%s: prefix information option" - " with unknown flags", - ifp->name); - continue; - } ia = ipv6nd_rapfindprefix(rap, &pi_prefix, pi.nd_opt_pi_prefix_len); if (ia == NULL) { ia = ipv6_newaddr(rap->iface, - &pi_prefix, pi.nd_opt_pi_prefix_len, - flags | IPV6_AF_RAPFX); + &pi_prefix, pi.nd_opt_pi_prefix_len, flags); if (ia == NULL) break; ia->prefix = pi_prefix; -- 2.47.2