From: Roy Marples Date: Wed, 17 Jun 2020 08:42:32 +0000 (+0100) Subject: inet6: No flags on the prefix means the prefix is via the router X-Git-Tag: v9.1.3~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f97dde9d742cac607f437681ad79e90de1aaa76a;p=thirdparty%2Fdhcpcd.git inet6: No flags on the prefix means the prefix is via the router Fixes a minor regression from prior. --- 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;