Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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_early_end(cur_match, res)) {
		if (tcf_em_is_inverted(cur_match))
			res = !res;

		if (tcf_em_early_end(cur_match, res)) {
			goto pop_stack;
		} else {
			match_idx++;