netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Francois-Xavier Le Bail <fx.lebail@yahoo.com>,
	NETDEV <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
	coreteam@netfilter.org
Subject: Re: [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
Date: Tue, 11 Feb 2014 16:11:02 +0000	[thread overview]
Message-ID: <ff58928d-2f4e-4572-a8c3-71a0ce1844c9@email.android.com> (raw)
In-Reply-To: <1392130165-4313-1-git-send-email-fx.lebail@yahoo.com>

On 11. Februar 2014 14:49:25 GMT+00:00, Francois-Xavier Le Bail <fx.lebail@yahoo.com> wrote:
>The solution was found by Patrick in 2.4 kernel sources.
>
>Cc: Patrick McHardy <kaber@trash.net>

Acked-by: Patrick McHardy <kaber@trash.net>

>Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
>---
> net/ipv4/netfilter/nf_nat_snmp_basic.c |    4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c
>b/net/ipv4/netfilter/nf_nat_snmp_basic.c
>index d551e31..7c67667 100644
>--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
>+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
>@@ -1198,8 +1198,8 @@ static int snmp_translate(struct nf_conn *ct,
> 		map.to = NOCT1(&ct->tuplehash[!dir].tuple.dst.u3.ip);
> 	} else {
> 		/* DNAT replies */
>-		map.from = NOCT1(&ct->tuplehash[dir].tuple.src.u3.ip);
>-		map.to = NOCT1(&ct->tuplehash[!dir].tuple.dst.u3.ip);
>+		map.from = NOCT1(&ct->tuplehash[!dir].tuple.src.u3.ip);
>+		map.to = NOCT1(&ct->tuplehash[dir].tuple.dst.u3.ip);
> 	}
> 
> 	if (map.from == map.to)
>--
>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



  reply	other threads:[~2014-02-11 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:49 [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches Francois-Xavier Le Bail
2014-02-11 16:11 ` Patrick McHardy [this message]
2014-02-14 17:00   ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff58928d-2f4e-4572-a8c3-71a0ce1844c9@email.android.com \
    --to=kaber@trash.net \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fx.lebail@yahoo.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).