netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
Subsystems (3)
PATCH 1/1 netfilter: nf_nat_snmp_basic: fix duplicates in if/else branches
The solution was found by Patrick in 2.4 kernel sources.
Cc Patrick McHardy <[email protected]>
Signed-off-by Francois-Xavier Le Bail <[email protected]>
--- net/ipv4/netfilter/nf_nat_snmp_basic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/netfilter/nf_nat_snmp_basic.c +2 -2
@@ -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)
Quoted 3 lines · Francois-Xavier Le Bail
The solution was found by Patrick in 2.4 kernel sources.
Cc Patrick McHardy <[email protected]>
Acked-by Patrick McHardy <[email protected]>
Quoted 26 lines
Signed-off-by Francois-Xavier Le Bail <[email protected]>---
net/ipv4/netfilter/nf_nat_snmp_basic.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)net/ipv4/netfilter/nf_nat_snmp_basic.c +2
-3@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Patrick McHardy
Quoted 3 lines · Francois-Xavier Le Bail
The solution was found by Patrick in 2.4 kernel sources.
Cc Patrick McHardy <[email protected]>Acked-by Patrick McHardy <[email protected]>
Applied, thanks!