diff options
author | Michael Brown | 2013-11-08 16:52:07 +0100 |
---|---|---|
committer | Michael Brown | 2013-11-14 13:35:43 +0100 |
commit | 95623e353bc09981c438ba53d863ffd572ddf85e (patch) | |
tree | 81fd99730bcd46236ae6574aa6fa50ad96229ffd /src/include/ipxe/in.h | |
parent | [settings] Move user-class setting from dhcp.c to settings.c (diff) | |
download | ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.gz ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.xz ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.zip |
[ipv6] Use given source address only if it is not the unspecified address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/in.h')
-rw-r--r-- | src/include/ipxe/in.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h index a37784e2..0f19bbd7 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 ) |