Commit 34a419d4 authored by Ignacy Gawędzki's avatar Ignacy Gawędzki Committed by David S. Miller

ematch: Fix early ending of inverted containers.

The result of a negated container has to be inverted before checking for
early ending.

This fixes my previous attempt (17c9c823) to
make inverted containers work correctly.
Signed-off-by: default avatarIgnacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e87474a6
......@@ -526,9 +526,10 @@ int __tcf_em_tree_match(struct sk_buff *skb, struct tcf_ematch_tree *tree,
match_idx = stack[--stackp];
cur_match = tcf_em_get_match(tree, match_idx);
if (tcf_em_is_inverted(cur_match))
res = !res;
if (tcf_em_early_end(cur_match, res)) {
if (tcf_em_is_inverted(cur_match))
res = !res;
goto pop_stack;
} else {
match_idx++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment