diff options
author | Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> | 2014-09-24 12:38:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-29 15:31:29 -0400 |
commit | 17c9c8232663a47f074b7452b9b034efda868ca7 (patch) | |
tree | ee59a9f356885228c4ed96ac857f5cad4b6393aa /net | |
parent | 73d3fe6d1c6d840763ceafa9afae0aaafa18c4b5 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/ematch.c | 6 |
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: | |||
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_early_end(cur_match, res)) | 529 | if (tcf_em_early_end(cur_match, res)) { |
530 | if (tcf_em_is_inverted(cur_match)) | ||
531 | res = !res; | ||
530 | goto pop_stack; | 532 | goto pop_stack; |
531 | else { | 533 | } else { |
532 | match_idx++; | 534 | match_idx++; |
533 | goto proceed; | 535 | goto proceed; |
534 | } | 536 | } |