Re: [PATCH] netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Acked-by: Patrick McHardy <kaber@xxxxxxxxx>

>Signed-off-by: Francois-Xavier Le Bail <fx.lebail@xxxxxxxxx>
>---
> 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@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux