]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
build: restore --disable-ipv6 functionality on system w/o v6 headers
authorOlaf Rempel <razzor@kopf-tisch.de>
Sun, 20 Sep 2009 11:24:11 +0000 (13:24 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 29 Oct 2009 18:04:00 +0000 (19:04 +0100)
Commit 332e4acc (iptables: accept multiple IP address specifications
for -s, d) broke the --disable-ipv6 configure option.

> ./.libs/libxtables.so: undefined reference to `in6addr_any'

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
xtables.c

index 4520124810cb6aaca0a03dcb0b4cdd5ecf93811a..bda49f8450ee6927599483e14b4dbaa4fe5595ae 100644 (file)
--- a/xtables.c
+++ b/xtables.c
@@ -1484,6 +1484,7 @@ void
 xtables_ip6parse_multiple(const char *name, struct in6_addr **addrpp,
                      struct in6_addr **maskpp, unsigned int *naddrs)
 {
+       static const struct in6_addr zero_addr;
        struct in6_addr *addrp;
        char buf[256], *p;
        unsigned int len, i, j, n, count = 1;
@@ -1526,7 +1527,7 @@ xtables_ip6parse_multiple(const char *name, struct in6_addr **addrpp,
                memcpy(*maskpp + i, addrp, sizeof(*addrp));
 
                /* if a null mask is given, the name is ignored, like in "any/0" */
-               if (memcmp(*maskpp + i, &in6addr_any, sizeof(in6addr_any)) == 0)
+               if (memcmp(*maskpp + i, &zero_addr, sizeof(zero_addr)) == 0)
                        strcpy(buf, "::");
 
                addrp = ip6parse_hostnetwork(buf, &n);