netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ematch: Fix the matching of inverted containers (again).
@ 2014-10-03  8:06 Ignacy Gawędzki
  2014-10-03 12:22 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Ignacy Gawędzki @ 2014-10-03  8:06 UTC (permalink / raw)
  To: netdev

The result of a negated container has to be inverted before checking for
early ending.

Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
---
 net/sched/ematch.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index ad57f44..300ecf6 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -526,11 +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_is_inverted(cur_match))
+			res = !res;
+
+		if (tcf_em_early_end(cur_match, res))
 			goto pop_stack;
-		} else {
+		else {
 			match_idx++;
 			goto proceed;
 		}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-05  0:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03  8:06 [PATCH net] ematch: Fix the matching of inverted containers (again) Ignacy Gawędzki
2014-10-03 12:22 ` Sergei Shtylyov
2014-10-03 13:44   ` [PATCH net v2 0/1] " Ignacy Gawędzki
2014-10-03 13:44   ` [PATCH net v2 1/1] ematch: Fix early ending of inverted containers Ignacy Gawędzki
2014-10-05  0:50     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).