From: Ignacy Gawędzki Date: Fri, 3 Oct 2014 13:44:48 +0000 (+0200) Subject: ematch: Fix early ending of inverted containers. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34a419d4e20d6be5e0c4a3b27f6eface366a4836;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- 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: 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++;