Skip to contentSkip to conversation

Fix incorrect IPv6 prefix formatting

PATCH Applied Phil Sutter 2 participants 2 messages May 10, 2019 – May 12, 2019 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 Fix incorrect IPv6 prefix formatting

Due to a typo, 127bit prefixes were omitted instead of 128bit ones.

Fixes a88e4b4ac1a1b ("Print IPv6 prefixes in CIDR notation")
---
 useful_functions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
useful_functions.c +1 -1
index bf4393712fa44..133ae2fd61eae 100644
@@ -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));
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw
Quoted 1 line · Phil Sutter

Due to a typo, 127bit prefixes were omitted instead of 128bit ones.

Applied, thanks Phil.