mirror of
https://github.com/ipxe/ipxe
synced 2026-02-06 21:29:29 +03:00
[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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user