[PATCH] libnetfilter_conntrack: conntrack/objopt: NO_EFFECT

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

 



static analysis (analysis based only on compiling of sources, not based
on running of binary) of the code revealed the following problem:

conntrack/objopt.c:63: self_assign: Assignment operation
                       "ct->snat.l4max.all = ct->snat.l4max.all"
                       has no effect.
---
 src/conntrack/objopt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/conntrack/objopt.c b/src/conntrack/objopt.c
index 7e6e5e2..6180663 100644
--- a/src/conntrack/objopt.c
+++ b/src/conntrack/objopt.c
@@ -60,7 +60,7 @@ static void setobjopt_undo_dnat(struct nf_conntrack *ct)
 static void setobjopt_undo_spat(struct nf_conntrack *ct)
 {
 	ct->snat.l4min.all = ct->tuple[__DIR_REPL].l4dst.tcp.port;
-	ct->snat.l4max.all = ct->snat.l4max.all;
+	ct->snat.l4max.all = ct->snat.l4min.all;
 	ct->tuple[__DIR_REPL].l4dst.tcp.port =
 			ct->tuple[__DIR_ORIG].l4src.tcp.port;
 	set_bit(ATTR_SNAT_PORT, ct->set);
-- 
1.7.5.2

--
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


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux