[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<N> blocks as a
whole, so use the sibling ordering capability instead.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user