From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: [PATCH 1/2] iptables: fix an inversion
Date: Tue, 1 Mar 2011 15:44:25 +0100 [thread overview]
Message-ID: <1298990667-22518-2-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1298990667-22518-1-git-send-email-jengelh@medozas.de>
Revisiting the original condition (viewable in git log -1 -p
v1.4.10-57-gacef604), one can notice an unforuntate inversion. This
commit corrects this.
Testcase: -A INPUT -p tcp --dport 1
Reported-by: Florian Westphal
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
xshared.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xshared.c b/xshared.c
index b47beb1..c5a9015 100644
--- a/xshared.c
+++ b/xshared.c
@@ -87,7 +87,7 @@ static bool should_load_proto(struct iptables_command_state *cs)
if (cs->protocol == NULL)
return false;
if (find_proto(cs->protocol, XTF_DONT_LOAD,
- cs->options & OPT_NUMERIC, NULL) != NULL)
+ cs->options & OPT_NUMERIC, NULL) == NULL)
return true;
return cs->proto_used;
}
--
1.7.1
next prev parent reply other threads:[~2011-03-01 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 14:44 iptables: option parsing inversion fix Jan Engelhardt
2011-03-01 14:44 ` Jan Engelhardt [this message]
2011-03-01 14:44 ` [PATCH 2/2] doc: add VERSION section to manpages Jan Engelhardt
2011-03-01 16:52 ` iptables: option parsing inversion fix Patrick McHardy
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=1298990667-22518-2-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--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).