All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
@ 2014-02-11 14:49 Francois-Xavier Le Bail
  2014-02-11 16:11 ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Francois-Xavier Le Bail @ 2014-02-11 14:49 UTC (permalink / raw
  To: NETDEV, David Miller, Patrick McHardy, netfilter-devel, netfilter,
	coreteam

The solution was found by Patrick in 2.4 kernel sources.

Cc: 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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
  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
  2014-02-14 17:00   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2014-02-11 16:11 UTC (permalink / raw
  To: Francois-Xavier Le Bail, NETDEV, David Miller, netfilter-devel,
	netfilter, coreteam

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
  2014-02-11 16:11 ` Patrick McHardy
@ 2014-02-14 17:00   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2014-02-14 17:00 UTC (permalink / raw
  To: Patrick McHardy
  Cc: Francois-Xavier Le Bail, NETDEV, David Miller, netfilter-devel,
	netfilter, coreteam

On Tue, Feb 11, 2014 at 04:11:02PM +0000, Patrick McHardy wrote:
> 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>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-14 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-02-14 17:00   ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.