]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libip6t_dst: make inversion work
authorFlorian Westphal <fw@strlen.de>
Thu, 19 Feb 2015 11:26:42 +0000 (12:26 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 19 Feb 2015 16:44:06 +0000 (17:44 +0100)
The inversion flag wasn't set in the match struct.

Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libip6t_dst.c
extensions/libip6t_dst.t

index 3fd4c019d4af73bae083d0f31c2f29f63d332b9e..fe7e3403468ce684981732444350e033be24ce2b 100644 (file)
@@ -112,6 +112,8 @@ static void dst_parse(struct xt_option_call *cb)
        xtables_option_parse(cb);
        switch (cb->entry->id) {
        case O_DSTLEN:
+               if (cb->invert)
+                       optinfo->invflags |= IP6T_OPTS_INV_LEN;
                optinfo->flags |= IP6T_OPTS_LEN;
                break;
        case O_DSTOPTS:
index b2788aaeb9ef1ec8b5ce752c26205039057937a0..0b0013b57fc0b35fc052aa6428418304c1cbf632 100644 (file)
@@ -1,4 +1,5 @@
 :INPUT,FORWARD,OUTPUT
 -m dst --dst-len 0;=;OK
 -m dst --dst-opts 149:92,12:12,123:12;=;OK
+-m dst ! --dst-len 42;=;OK
 -m dst --dst-len 42 --dst-opts 149:92,12:12,123:12;=;OK