netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libnetfilter_conntrack: conntrack/objopt: NO_EFFECT
@ 2011-06-10  9:12 Jiri Popelka
  2011-06-13 17:51 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Popelka @ 2011-06-10  9:12 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Jiri Popelka

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


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

end of thread, other threads:[~2011-06-13 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10  9:12 [PATCH] libnetfilter_conntrack: conntrack/objopt: NO_EFFECT Jiri Popelka
2011-06-13 17:51 ` Pablo Neira Ayuso

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