From f6521c587a586de5fdafb0a322072e5ff67f8e15 Mon Sep 17 00:00:00 2001 From: Paul Blakey Date: Sun, 3 Jun 2018 10:06:14 +0300 Subject: [PATCH] cls_flower: Fix comparing of old filter mask with new filter We incorrectly compare the mask and the result is that we can't modify an already existing rule. Fix that by comparing correctly. Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority") Reported-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Signed-off-by: Paul Blakey Reviewed-by: Simon Horman Signed-off-by: David S. Miller --- net/sched/cls_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 159efd9..2b5be42 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -877,7 +877,7 @@ static int fl_check_assign_mask(struct cls_fl_head *head, return PTR_ERR(newmask); fnew->mask = newmask; - } else if (fold && fold->mask == fnew->mask) { + } else if (fold && fold->mask != fnew->mask) { return -EINVAL; } -- 2.7.4