Skip to contentSkip to conversation

libnetfilter_conntrack: conntrack/objopt: NO_EFFECT

PATCH Applied Jiri Popelka 2 participants 2 messages Jun 10, 2011 – Jun 13, 2011 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnetfilter_conntrack: conntrack/objopt: NO_EFFECT

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(-)
src/conntrack/objopt.c +1 -1
index 7e6e5e2..6180663 100644
@@ -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);
Signature · 1 line
1.7.5.2
maintainer Applied
#1 lore raw
Quoted 6 lines · 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.

Applied, thanks Jiri.