summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/in.h
diff options
context:
space:
mode:
authorMichael Brown2015-07-28 14:00:15 +0200
committerMichael Brown2015-07-28 14:48:23 +0200
commit41670ca2fe6990b115ab717bcfd4af1e1e44c419 (patch)
tree4b3c4a6722713f698b1e41e644583697c7dd7015 /src/include/ipxe/in.h
parent[build] Fix strict-aliasing warning on older gcc versions (diff)
downloadipxe-41670ca2fe6990b115ab717bcfd4af1e1e44c419.tar.gz
ipxe-41670ca2fe6990b115ab717bcfd4af1e1e44c419.tar.xz
ipxe-41670ca2fe6990b115ab717bcfd4af1e1e44c419.zip
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/in.h')
-rw-r--r--src/include/ipxe/in.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h
index 75f23123..b29c2d74 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
*/