summaryrefslogtreecommitdiffstats
path: root/src/net/ipv6.c
diff options
context:
space:
mode:
authorMichael Brown2016-07-19 17:57:32 +0200
committerMichael Brown2016-07-19 18:07:53 +0200
commit4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d (patch)
tree6d576931282819e6f62db87b9c917a6740dc0176 /src/net/ipv6.c
parent[settings] Allow settings blocks to specify a sibling ordering (diff)
downloadipxe-4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d.tar.gz
ipxe-4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d.tar.xz
ipxe-4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d.zip
[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>
Diffstat (limited to 'src/net/ipv6.c')
-rw-r--r--src/net/ipv6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index cdd6640c..04ba3d8b 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -1185,6 +1185,7 @@ static int ipv6_register_settings ( struct net_device *netdev ) {
ref_init ( &ipv6set->refcnt, NULL );
settings_init ( &ipv6set->settings, &ipv6_settings_operations,
&ipv6set->refcnt, &ipv6_scope );
+ ipv6set->settings.order = IPV6_ORDER_LINK_LOCAL;
/* Register settings */
if ( ( rc = register_settings ( &ipv6set->settings, parent,