* [PATCH] netfilter: ipv6: icmpv6_manip_pkt comparing codes to types
@ 2013-09-13 1:04 Phil Oester
2013-09-14 19:24 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2013-09-13 1:04 UTC (permalink / raw)
To: netfilter-devel; +Cc: pablo
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
In commit 58a317f1 (netfilter: ipv6: add IPv6 NAT support), icmpv6_manip_pkt
was added with an incorrect comparison of ICMP codes to types. This causes
problems when using NAT rules with the --random option. Correct the
comparison.
This closes netfilter bugzilla #851, reported by Alexander Neumann.
Signed-off-by: Phil Oester <kernel@linuxace.com>
[-- Attachment #2: patch-icmpv6_manip_pkt --]
[-- Type: text/plain, Size: 714 bytes --]
diff --git a/net/ipv6/netfilter/nf_nat_proto_icmpv6.c b/net/ipv6/netfilter/nf_nat_proto_icmpv6.c
index 61aaf70..2205e8e 100644
--- a/net/ipv6/netfilter/nf_nat_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_nat_proto_icmpv6.c
@@ -69,8 +69,8 @@ icmpv6_manip_pkt(struct sk_buff *skb,
hdr = (struct icmp6hdr *)(skb->data + hdroff);
l3proto->csum_update(skb, iphdroff, &hdr->icmp6_cksum,
tuple, maniptype);
- if (hdr->icmp6_code == ICMPV6_ECHO_REQUEST ||
- hdr->icmp6_code == ICMPV6_ECHO_REPLY) {
+ if (hdr->icmp6_type == ICMPV6_ECHO_REQUEST ||
+ hdr->icmp6_type == ICMPV6_ECHO_REPLY) {
inet_proto_csum_replace2(&hdr->icmp6_cksum, skb,
hdr->icmp6_identifier,
tuple->src.u.icmp.id, 0);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter: ipv6: icmpv6_manip_pkt comparing codes to types
2013-09-13 1:04 [PATCH] netfilter: ipv6: icmpv6_manip_pkt comparing codes to types Phil Oester
@ 2013-09-14 19:24 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2013-09-14 19:24 UTC (permalink / raw)
To: Phil Oester; +Cc: netfilter-devel
On Thu, Sep 12, 2013 at 06:04:16PM -0700, Phil Oester wrote:
> In commit 58a317f1 (netfilter: ipv6: add IPv6 NAT support), icmpv6_manip_pkt
> was added with an incorrect comparison of ICMP codes to types. This causes
> problems when using NAT rules with the --random option. Correct the
> comparison.
>
> This closes netfilter bugzilla #851, reported by Alexander Neumann.
Applied, thanks Phil.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-14 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 1:04 [PATCH] netfilter: ipv6: icmpv6_manip_pkt comparing codes to types Phil Oester
2013-09-14 19:24 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).