diff options
author | Paul Blakey <paulb@mellanox.com> | 2018-06-03 10:06:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-04 17:03:37 -0400 |
commit | f6521c587a586de5fdafb0a322072e5ff67f8e15 (patch) | |
tree | 31d6061da1dd7b2b27eb10a479e7bdc5a7ee7067 /net | |
parent | de9dc650f05f5c427a623797342bb2870ceedd38 (diff) | |
download | linux-f6521c587a586de5fdafb0a322072e5ff67f8e15.tar.bz2 |
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 <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/cls_flower.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 159efd98ee9a..2b5be42a9f1c 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; } |