From 3c7f5f9c4ca535dbd2f86996f71342e685d4ce50 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 21 May 2014 17:51:31 +0100 Subject: [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 Signed-off-by: Michael Brown --- src/include/ipxe/in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include/ipxe') diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h index 36032470c..de96ca22a 100644 --- a/src/include/ipxe/in.h +++ b/src/include/ipxe/in.h @@ -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 -- cgit v1.2.3-55-g7522