Mercurial > hg > freeDiameter
diff include/freeDiameter/libfreeDiameter.h @ 135:bbb8ddba4c85
Filter out more invalid addresses
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 16 Dec 2009 14:44:56 +0900 |
parents | 6b2989c066a6 |
children | 5510f73e1737 |
line wrap: on
line diff
--- a/include/freeDiameter/libfreeDiameter.h Tue Dec 15 18:15:41 2009 +0900 +++ b/include/freeDiameter/libfreeDiameter.h Wed Dec 16 14:44:56 2009 +0900 @@ -400,6 +400,12 @@ ((((long int) (a)->s_addr) & ntohl(0xff000000)) == ntohl(0x7f000000)) #endif /* IN_IS_ADDR_LOOPBACK */ +/* An IP equivalent to IN6_IS_ADDR_UNSPECIFIED */ +#ifndef IN_IS_ADDR_UNSPECIFIED +#define IN_IS_ADDR_UNSPECIFIED(a) \ + (((long int) (a)->s_addr) == 0x00000000) +#endif /* IN_IS_ADDR_UNSPECIFIED */ + /* create a V4MAPPED address */ #define IN6_ADDR_V4MAP( a6, a4 ) { \