]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: fix the dead loop when meeting unknown options
authorChangli Gao <xiaosuo@gmail.com>
Mon, 14 Mar 2011 06:23:31 +0000 (14:23 +0800)
committerJan Engelhardt <jengelh@medozas.de>
Mon, 9 May 2011 09:41:00 +0000 (11:41 +0200)
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
xshared.c

index 404a9f5fdf249b9431bc5ea3a222ae080bedad0b..87402b427a851f0aee704f5319f1ca0257d9d712 100644 (file)
--- a/xshared.c
+++ b/xshared.c
@@ -92,7 +92,7 @@ static bool should_load_proto(struct iptables_command_state *cs)
        if (find_proto(cs->protocol, XTF_DONT_LOAD,
            cs->options & OPT_NUMERIC, NULL) == NULL)
                return true;
-       return cs->proto_used;
+       return !cs->proto_used;
 }
 
 struct xtables_match *load_proto(struct iptables_command_state *cs)