mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 04:28:12 +03:00
[ipv6] Fix definition of IN6_IS_ADDR_LINKLOCAL()
Fix an erroneous htonl() in the definition of IN6_IS_ADDR_LINKLOCAL(), and add self-tests for the IN6_IS_ADDR_xxx() family of macros. Reported-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -61,7 +61,7 @@ struct in6_addr {
|
||||
|
||||
#define IN6_IS_ADDR_LINKLOCAL( addr ) \
|
||||
( ( *( ( const uint16_t * ) (addr) ) & htons ( 0xffc0 ) ) == \
|
||||
htonl ( 0xfe80 ) )
|
||||
htons ( 0xfe80 ) )
|
||||
|
||||
/**
|
||||
* IPv4 socket address
|
||||
|
||||
Reference in New Issue
Block a user