Skip to contentSkip to conversation

iptables: nft-ipv6: Replace ip with ip6

PATCH Superseded Shivani Bhardwaj 1 participant 1 message Dec 29, 2015 netfilter

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptables: nft-ipv6: Replace ip with ip6

Replace ip with ip6 to avoid conflict between the protocols in the results obtained from ip6tables-translate utility.

---
 iptables/nft-ipv6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
iptables/nft-ipv6.c +3 -3
index 107a84e..ae03b2e 100644
@@ -416,16 +416,16 @@ static int nft_ipv6_xlate(const void *data, struct xt_buf *buf)
 			snprintf(protonum, sizeof(protonum), "%u",
 				 cs->fw6.ipv6.proto);
 			protonum[sizeof(protonum) - 1] = '\0';
-			xt_buf_add(buf, "ip protocol %s%s ",
+			xt_buf_add(buf, "ip6 protocol %s%s ",
 				   cs->fw6.ipv6.invflags & IP6T_INV_PROTO ?
 					"!= " : "",
 				   pent ? pent->p_name : protonum);
 		}
 	}
 
-	xlate_ipv6_addr("ip saddr", &cs->fw6.ipv6.src,
+	xlate_ipv6_addr("ip6 saddr", &cs->fw6.ipv6.src,
 			cs->fw6.ipv6.invflags & IP6T_INV_SRCIP, buf);
-	xlate_ipv6_addr("ip daddr", &cs->fw6.ipv6.dst,
+	xlate_ipv6_addr("ip6 daddr", &cs->fw6.ipv6.dst,
 			cs->fw6.ipv6.invflags & IP6T_INV_DSTIP, buf);
 
 	ret = xlate_matches(cs, buf);
Signature · 1 line
1.9.1