From 95623e353bc09981c438ba53d863ffd572ddf85e Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 8 Nov 2013 15:52:07 +0000 Subject: [ipv6] Use given source address only if it is not the unspecified address Signed-off-by: Michael Brown --- src/include/ipxe/in.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h index a37784e2e..0f19bbd7c 100644 --- a/src/include/ipxe/in.h +++ b/src/include/ipxe/in.h @@ -50,6 +50,12 @@ struct in6_addr { #define s6_addr32 in6_u.u6_addr32 }; +#define IN6_IS_ADDR_UNSPECIFIED( addr ) \ + ( ( ( ( ( const uint32_t * ) (addr) )[0] ) | \ + ( ( ( const uint32_t * ) (addr) )[1] ) | \ + ( ( ( const uint32_t * ) (addr) )[2] ) | \ + ( ( ( const uint32_t * ) (addr) )[3] ) ) == 0 ) + #define IN6_IS_ADDR_MULTICAST( addr ) \ ( *( ( const uint8_t * ) (addr) ) == 0xff ) -- cgit v1.2.3-55-g7522