aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnacy Gawędzki <ignacy.gawedzki@green-communications.fr>2014-10-03 09:44:48 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-04 20:49:46 -0400
commit34a419d4e20d6be5e0c4a3b27f6eface366a4836 (patch)
tree2c56cf3b933968f015cc2ea3aec1046860dcf3ab
parente87474a6e697857df21cff0707a2472abceca8b3 (diff)
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 (17c9c8232663a47f074b7452b9b034efda868ca7) to make inverted containers work correctly. Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/ematch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index ad57f4444b9c..f878fa16349a 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -526,9 +526,10 @@ pop_stack:
526 match_idx = stack[--stackp]; 526 match_idx = stack[--stackp];
527 cur_match = tcf_em_get_match(tree, match_idx); 527 cur_match = tcf_em_get_match(tree, match_idx);
528 528
529 if (tcf_em_is_inverted(cur_match))
530 res = !res;
531
529 if (tcf_em_early_end(cur_match, res)) { 532 if (tcf_em_early_end(cur_match, res)) {
530 if (tcf_em_is_inverted(cur_match))
531 res = !res;
532 goto pop_stack; 533 goto pop_stack;
533 } else { 534 } else {
534 match_idx++; 535 match_idx++;