summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-05-10 18:24:13 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-12 19:58:29 +0200
commite65b3d30c4942501b1ea485743fe0de1e2fe3e9e (patch)
tree5e4084fd3101536311e3a8e50ed4ad506da6a26e
parentc9348e18f3cdd52a7cb1586e03a55cefac08d849 (diff)
Fix incorrect IPv6 prefix formatting
Due to a typo, 127bit prefixes were omitted instead of 128bit ones. Reported-by: Laine Stump <laine@redhat.com> Fixes: a88e4b4ac1a1b ("Print IPv6 prefixes in CIDR notation") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--useful_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/useful_functions.c b/useful_functions.c
index bf43937..133ae2f 100644
--- a/useful_functions.c
+++ b/useful_functions.c
@@ -445,7 +445,7 @@ char *ebt_ip6_mask_to_string(const struct in6_addr *msk)
int l = ebt_ip6mask_to_cidr(msk);
static char buf[51+1];
- if (l == 127)
+ if (l == 128)
*buf = '\0';
else if (l == -1)
sprintf(buf, "/%s", ebt_ip6_to_numeric(msk));