summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
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 45201248..bda49f84 100644
--- 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);