]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ebtables-compat: support intra-positioned negations
authorFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 15:41:47 +0000 (17:41 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 13 Apr 2018 18:05:51 +0000 (20:05 +0200)
ebtables sitll allows intra-postitioned negations, e.g.

--ip-src ! 1.2.3.4

support this.

Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/xtables-eb.c

index 596894fdc00042523020c623dac288aa5d5a4a7a..adeaa1294319dce3ca30cd57ab2aa971c4c799c2 100644 (file)
@@ -1261,7 +1261,7 @@ big_iface_length:
 
                        /* Is it a match_option? */
                        for (m = xtables_matches; m; m = m->next) {
-                               if (m->parse(c - m->option_offset, argv, ebt_invert, &m->mflags, NULL, &m->m)) {
+                               if (m->parse(c - m->option_offset, argv, ebt_check_inverse2(optarg, argc, argv), &m->mflags, NULL, &m->m)) {
                                        ebt_add_match(m, &cs);
                                        goto check_extension;
                                }