diff options
author | Michael Brown | 2016-07-19 17:57:32 +0200 |
---|---|---|
committer | Michael Brown | 2016-07-19 18:07:53 +0200 |
commit | 4ad3c73b3099cfe3b7f1c79ddfe9061809e4ac6d (patch) | |
tree | 6d576931282819e6f62db87b9c917a6740dc0176 /src/include | |
parent | [settings] Allow settings blocks to specify a sibling ordering (diff) | |
download | ipxe-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/include')
-rw-r--r-- | src/include/ipxe/ipv6.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/ipxe/ipv6.h b/src/include/ipxe/ipv6.h index 86c8ff92..4dd03f05 100644 --- a/src/include/ipxe/ipv6.h +++ b/src/include/ipxe/ipv6.h @@ -238,6 +238,18 @@ static inline void ipv6_all_routers ( struct in6_addr *addr ) { addr->s6_addr[15] = 2; } +/** IPv6 settings sibling order */ +enum ipv6_settings_order { + /** No address */ + IPV6_ORDER_PREFIX_ONLY = -4, + /** Link-local address */ + IPV6_ORDER_LINK_LOCAL = -3, + /** Address assigned via SLAAC */ + IPV6_ORDER_SLAAC = -2, + /** Address assigned via DHCPv6 */ + IPV6_ORDER_DHCPV6 = -1, +}; + /** IPv6 link-local address settings block name */ #define IPV6_SETTINGS_NAME "link" |