From 41670ca2fe6990b115ab717bcfd4af1e1e44c419 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 28 Jul 2015 13:00:15 +0100 Subject: [ipv6] Treat a missing network device name as "netX" When an IPv6 socket address string specifies a link-local or multicast address but does not specify the requisite network device name (e.g. "fe80::69ff:fe50:5845" rather than "fe80::69ff:fe50:5845%net0"), assume the use of "netX". Signed-off-by: Michael Brown --- src/include/ipxe/in.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h index 75f23123d..b29c2d74a 100644 --- a/src/include/ipxe/in.h +++ b/src/include/ipxe/in.h @@ -63,6 +63,9 @@ struct in6_addr { ( ( *( ( const uint16_t * ) (addr) ) & htons ( 0xffc0 ) ) == \ htons ( 0xfe80 ) ) +#define IN6_IS_ADDR_NONGLOBAL( addr ) \ + ( IN6_IS_ADDR_LINKLOCAL (addr) || IN6_IS_ADDR_MULTICAST (addr) ) + /** * IPv4 socket address */ -- cgit v1.2.3-55-g7522