summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-17 09:42:32 +0100
committerRoy Marples <roy@marples.name>2020-06-17 09:43:17 +0100
commitf97dde9d742cac607f437681ad79e90de1aaa76a (patch)
tree9b089098e60c8e17bb224caaf5618136a45e7cfc
parent9b3c9117fa48351e6b7e15176ace67163eccaecc (diff)
downloaddhcpcd-f97dde9d742cac607f437681ad79e90de1aaa76a.tar.xz
inet6: No flags on the prefix means the prefix is via the router
Fixes a minor regression from prior.
-rw-r--r--src/ipv6nd.c14
1 files 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;