summaryrefslogtreecommitdiffstats
path: root/libxtables/xtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxtables/xtables.c')
-rw-r--r--libxtables/xtables.c6
1 files changed, 5 insertions, 1 deletions
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;
}