diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-07-28 13:00:15 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-07-28 13:48:23 +0100 |
commit | 41670ca2fe6990b115ab717bcfd4af1e1e44c419 (patch) | |
tree | 4b3c4a6722713f698b1e41e644583697c7dd7015 /src/include/ipxe/in.h | |
parent | fae7a5310ad560f6afa3ab94ed349510443caf56 (diff) | |
download | ipxe-41670ca2fe6990b115ab717bcfd4af1e1e44c419.tar.gz |
[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.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ |