ematch: Fix early ending of inverted containers.
[pandora-kernel.git] / net / sched / ematch.c
index 3a633de..f878fa1 100644 (file)
@@ -526,9 +526,12 @@ pop_stack:
                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 {
+               else {
                        match_idx++;
                        goto proceed;
                }