diff mbox

[v2] iptables: nft-ipv6: Replace ip with ip6

Message ID 20151230053808.GA3717@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Shivani Bhardwaj Dec. 30, 2015, 5:38 a.m. UTC
Replace ip with ip6 to avoid conflict between the protocols in the
results obtained from ip6tables-translate utility.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
Changes in v2:
	Replace protocol with nexthdr

 iptables/nft-ipv6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Pablo Neira Ayuso Jan. 3, 2016, 8:14 p.m. UTC | #1
On Wed, Dec 30, 2015 at 11:08:08AM +0530, Shivani Bhardwaj wrote:
> Replace ip with ip6 to avoid conflict between the protocols in the
> results obtained from ip6tables-translate utility.

Applied, thanks Shivani.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c
index 107a84e..0b6ff97 100644
--- a/iptables/nft-ipv6.c
+++ b/iptables/nft-ipv6.c
@@ -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 nexthdr %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);