From: Vincent Bernat Date: Fri, 13 Feb 2015 17:02:16 +0000 (+0100) Subject: interfaces: enforce redefinition of IN_IS_ADDR_* macros X-Git-Tag: 0.7.14~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c6a1966eead5843d18bd01d8ce3b2ae93d5378b;p=thirdparty%2Flldpd.git interfaces: enforce redefinition of IN_IS_ADDR_* macros For IPv4, some definitions may differ from one OS to another. Better safe than sorry: use the same definition for everyone. --- diff --git a/src/daemon/interfaces.c b/src/daemon/interfaces.c index c0e03b5d..e2f8c6e9 100644 --- a/src/daemon/interfaces.c +++ b/src/daemon/interfaces.c @@ -340,19 +340,15 @@ interfaces_helper_chassis(struct lldpd *cfg, } } -#ifndef IN_IS_ADDR_LOOPBACK +#undef IN_IS_ADDR_LOOPBACK #define IN_IS_ADDR_LOOPBACK(a) ((a)->s_addr == htonl(INADDR_LOOPBACK)) -#endif -#ifndef IN_IS_ADDR_ANY +#undef IN_IS_ADDR_ANY #define IN_IS_ADDR_ANY(a) ((a)->s_addr == htonl(INADDR_ANY)) -#endif -#ifndef IN_IS_ADDR_GLOBAL +#undef IN_IS_ADDR_GLOBAL #define IN_IS_ADDR_GLOBAL(a) (!IN_IS_ADDR_LOOPBACK(a) && !IN_IS_ADDR_ANY(a)) -#endif -#ifndef IN6_IS_ADDR_GLOBAL +#undef IN6_IS_ADDR_GLOBAL #define IN6_IS_ADDR_GLOBAL(a) \ (!IN6_IS_ADDR_LOOPBACK(a) && !IN6_IS_ADDR_LINKLOCAL(a)) -#endif /* Find a management address in all available interfaces, even those that were already handled. This is a special interface handler because it does not