summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnacy Gawędzki <ignacy.gawedzki@green-communications.fr>2014-09-24 18:38:39 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-29 21:31:29 +0200
commit17c9c8232663a47f074b7452b9b034efda868ca7 (patch)
treeee59a9f356885228c4ed96ac857f5cad4b6393aa
parentgro: fix aggregation for skb using frag_list (diff)
downloadlinux-17c9c8232663a47f074b7452b9b034efda868ca7.tar.xz
linux-17c9c8232663a47f074b7452b9b034efda868ca7.zip
ematch: Fix matching of inverted containers.
Negated expressions and sub-expressions need to have their flags checked for TCF_EM_INVERT and their result negated accordingly. 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 3a633debb6df..ad57f4444b9c 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -526,9 +526,11 @@ 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_early_end(cur_match, res)) {
+ if (tcf_em_is_inverted(cur_match))
+ res = !res;
goto pop_stack;
- else {
+ } else {
match_idx++;
goto proceed;
}