From 945353a25bbb2dbf88128c27a9169851da6ebf05 Mon Sep 17 00:00:00 2001 From: Phil Oester Date: Thu, 20 Jun 2013 16:11:38 -0400 Subject: ip6tables: don't print out /128 Similar to how iptables does not print /32 on IPv4 addresses, ip6tables should not print out /128 on IPv6 addresses. Signed-off-by: Phil Oester Signed-off-by: Pablo Neira Ayuso --- libxtables/xtables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libxtables/xtables.c b/libxtables/xtables.c index ebc77b6c..ef5bc072 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -1597,7 +1597,11 @@ const char *xtables_ip6mask_to_numeric(const struct in6_addr *addrp) strcat(buf, xtables_ip6addr_to_numeric(addrp)); return buf; } - sprintf(buf, "/%d", l); + /* we don't want to see "/128" */ + if (l == 128) + return ""; + else + sprintf(buf, "/%d", l); return buf; } -- cgit v1.2.3