Commit f6521c58 authored by Paul Blakey's avatar Paul Blakey Committed by David S. Miller
Browse files

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: 05cd271f ("cls_flower: Support multiple masks per priority")
Reported-by: default avatarVlad Buslov <vladbu@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent de9dc650
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}