summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-04-03 22:40:35 +0200
committerJan Engelhardt <jengelh@medozas.de>2009-04-03 22:40:35 +0200
commit9c0fa7d8c84dc2478bd36d31b328b697fbe4d0af (patch)
treeba4a93962bfb98a09a2695aa4419427e416a743c /xtables.c
parenta094eb0f2a57592b6f3cf42fdbb9d49fead2d57c (diff)
libxtables: provide IPv6 zero address variable
µClibc may not provide the in6addr_any variable when IPv6 is disabled. So just provide it ourselves. Reference: http://bugzilla.netfilter.org/show_bug.cgi?id=569 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xtables.c b/xtables.c
index 044603f9..a01d4ea0 100644
--- a/xtables.c
+++ b/xtables.c
@@ -1367,6 +1367,7 @@ static struct in6_addr *parse_ip6mask(char *mask)
void xtables_ip6parse_any(const char *name, struct in6_addr **addrpp,
struct in6_addr *maskp, unsigned int *naddrs)
{
+ static const struct in6_addr zero_addr;
struct in6_addr *addrp;
unsigned int i, j, k, n;
char buf[256], *p;
@@ -1382,7 +1383,7 @@ void xtables_ip6parse_any(const char *name, struct in6_addr **addrpp,
memcpy(maskp, addrp, sizeof(*maskp));
/* if a null mask is given, the name is ignored, like in "any/0" */
- if (memcmp(maskp, &in6addr_any, sizeof(in6addr_any)) == 0)
+ if (memcmp(maskp, &zero_addr, sizeof(zero_addr)) == 0)
strcpy(buf, "::");
addrp = *addrpp = ip6parse_hostnetwork(buf, naddrs);