From d741185c914874b112059c7a8651b94a9029702f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Nov 2017 07:50:36 -0600 Subject: [PATCH] net/icmpv6/icmpv6_radvertise.c: set the prefix length to preconfigured value --- net/icmpv6/icmpv6_radvertise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/icmpv6/icmpv6_radvertise.c b/net/icmpv6/icmpv6_radvertise.c index 45a36f9d69..86c4f52430 100644 --- a/net/icmpv6/icmpv6_radvertise.c +++ b/net/icmpv6/icmpv6_radvertise.c @@ -226,11 +226,12 @@ void icmpv6_radvertise(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_ICMPv6_ROUTER_MANUAL /* Copy the configured prefex */ + prefix->preflen = CONFIG_NET_ICMPv6_PREFLEN; net_ipv6addr_copy(prefix->prefix, g_ipv6_prefix); #else /* Set the prefix and prefix length based on net driver IP and netmask */ - prefix->preflen = net_ipv6_mask2pref(dev->d_ipv6netmask); + prefix->preflen = net_ipv6_mask2pref(dev->d_ipv6netmask); ipv6addr_mask(prefix->prefix, dev->d_ipv6addr, dev->d_ipv6netmask); #endif /* CONFIG_NET_ICMPv6_ROUTER_MANUAL */