[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>
This commit is contained in:
Michael Brown
2015-07-28 13:00:15 +01:00
parent fae7a5310a
commit 41670ca2fe
2 changed files with 18 additions and 4 deletions

View File

@@ -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
*/