From 4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 19 Jul 2016 16:57:32 +0100 Subject: [ipv6] Match user expectations for IPv6 settings priorities A reasonable user expectation is that ${net0/ip6} should show the "highest-priority" of the IPv6 addresses, even when multiple IPv6 addresses are active. The expected order of priority is likely to be manually-assigned addresses first, then stateful DHCPv6 addresses, then SLAAC addresses, and lastly link-local addresses. Using ${priority} to enforce an ordering is undesirable since that would affect the priority assigned to each of the net blocks as a whole, so use the sibling ordering capability instead. Signed-off-by: Michael Brown --- src/net/udp/dhcpv6.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/net/udp') diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c index ac7010422..a2c69aaae 100644 --- a/src/net/udp/dhcpv6.c +++ b/src/net/udp/dhcpv6.c @@ -375,6 +375,7 @@ static int dhcpv6_register ( struct in6_addr *lease, ref_init ( &dhcpv6set->refcnt, NULL ); settings_init ( &dhcpv6set->settings, &dhcpv6_settings_operations, &dhcpv6set->refcnt, &dhcpv6_scope ); + dhcpv6set->settings.order = IPV6_ORDER_DHCPV6; data = ( ( ( void * ) dhcpv6set ) + sizeof ( *dhcpv6set ) ); len = options->len; memcpy ( data, options->data, len ); -- cgit v1.2.3-55-g7522