Remove ability to compile without IPv6 support.

This was the source of a large number of #ifdefs, originally
included for use with old embedded libc versions. I'm
sure no-one wants or needs IPv6-free code these days, so this
is a move towards more maintainable code.
This commit is contained in:
Simon Kelley
2018-10-23 22:10:17 +01:00
parent a220545c42
commit ee8750451b
22 changed files with 56 additions and 418 deletions

View File

@@ -51,11 +51,10 @@ void netlink_init(void)
addr.nl_groups = RTMGRP_IPV4_ROUTE;
if (option_bool(OPT_CLEVERBIND))
addr.nl_groups |= RTMGRP_IPV4_IFADDR;
#ifdef HAVE_IPV6
addr.nl_groups |= RTMGRP_IPV6_ROUTE;
if (option_bool(OPT_CLEVERBIND))
addr.nl_groups |= RTMGRP_IPV6_IFADDR;
#endif
#ifdef HAVE_DHCP6
if (daemon->doing_ra || daemon->doing_dhcp6)
addr.nl_groups |= RTMGRP_IPV6_IFADDR;
@@ -235,7 +234,6 @@ int iface_enumerate(int family, void *parm, int (*callback)())
if (!((*callback)(addr, ifa->ifa_index, label, netmask, broadcast, parm)))
callback_ok = 0;
}
#ifdef HAVE_IPV6
else if (ifa->ifa_family == AF_INET6)
{
struct in6_addr *addrp = NULL;
@@ -270,7 +268,6 @@ int iface_enumerate(int family, void *parm, int (*callback)())
(int) preferred, (int)valid, parm)))
callback_ok = 0;
}
#endif
}
}
else if (h->nlmsg_type == RTM_NEWNEIGH && family == AF_UNSPEC)