]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xshared: do_parse: Ignore '-j CONTINUE'
authorPhil Sutter <phil@nwl.cc>
Wed, 22 Nov 2023 02:58:18 +0000 (03:58 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 23 Nov 2023 16:59:42 +0000 (17:59 +0100)
While iptables does not support his NOP, arptables man page claims it
does (although legacy arptables rejects it) and ebtables prefers to
print it instead of omitting the '-j' option.

Accept and ignore the target when parsing to at least fix for
arptables-nft and prepare for ebtables-nft using do_parse() as well.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/xshared.c

index c4d7a266fed5e52421cf7e7912a96e08594e60b9..1b02f35a9de3a1365e00b5ecfe9cc0c829742dc9 100644 (file)
@@ -1634,7 +1634,8 @@ void do_parse(int argc, char *argv[],
                case 'j':
                        set_option(&cs->options, OPT_JUMP, &args->invflags,
                                   invert);
-                       command_jump(cs, optarg);
+                       if (strcmp(optarg, "CONTINUE"))
+                               command_jump(cs, optarg);
                        break;
 
                case 'i':