]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: fix an inversion
authorJan Engelhardt <jengelh@medozas.de>
Tue, 1 Mar 2011 01:45:34 +0000 (02:45 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 1 Mar 2011 14:43:38 +0000 (15:43 +0100)
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

index b47beb1e3a52291eeaf440eb53d97215034eb2cb..c5a9015de8527648c43c695a1cd6479d6346209f 100644 (file)
--- 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;
 }