From 0c6a1966eead5843d18bd01d8ce3b2ae93d5378b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 13 Feb 2015 18:02:16 +0100 Subject: [PATCH] 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. --- src/daemon/interfaces.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 -- 2.47.2