netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Popelka <jpopelka@redhat.com>
To: netfilter-devel@vger.kernel.org
Cc: Jiri Popelka <jpopelka@redhat.com>
Subject: [PATCH] libnetfilter_conntrack: conntrack/objopt: NO_EFFECT
Date: Fri, 10 Jun 2011 11:12:15 +0200	[thread overview]
Message-ID: <1307697135-6693-1-git-send-email-jpopelka@redhat.com> (raw)

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


             reply	other threads:[~2011-06-10  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10  9:12 Jiri Popelka [this message]
2011-06-13 17:51 ` [PATCH] libnetfilter_conntrack: conntrack/objopt: NO_EFFECT Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307697135-6693-1-git-send-email-jpopelka@redhat.com \
    --to=jpopelka@redhat.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).