From 780607f8b040a47cd2d4775376e2d30f567dc049 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 7 Jun 2011 22:20:13 +0200 Subject: option: fix ignored negation before implicit extension loading `iptables -A INPUT -p tcp ! --syn` forgot the negation, i.e. it was not present in a subsequent `iptables -S`. Commit v1.4.11~77^2~9 missed the fact that after autoloading a proto extension, cs.invert must not be touched until the next getopt call. This is now fixed by having command_default return a value to indicate whether to jump or not. Signed-off-by: Jan Engelhardt --- iptables/iptables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iptables/iptables.c') diff --git a/iptables/iptables.c b/iptables/iptables.c index d9c6436c..4ae75419 100644 --- a/iptables/iptables.c +++ b/iptables/iptables.c @@ -1743,7 +1743,9 @@ int do_command4(int argc, char *argv[], char **table, struct iptc_handle **handl exit_tryhelp(2); default: - command_default(&cs, &iptables_globals); + if (command_default(&cs, &iptables_globals) == 1) + /* cf. ip6tables.c */ + continue; break; } cs.invert = FALSE; -- cgit v1.2.3