]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: nft-ipv6: Replace ip with ip6
authorShivani Bhardwaj <shivanib134@gmail.com>
Wed, 30 Dec 2015 05:38:08 +0000 (11:08 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 16 Feb 2016 18:30:23 +0000 (19:30 +0100)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-ipv6.c

index 107a84e298a974d44fce8b19d842308cd0e46ee3..0b6ff97e0aa2285a4065b487fdce91a162afc67c 100644 (file)
@@ -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);