OSDN Git Service

net: sched: fix flush on non-existing chain
authorJiri Pirko <jiri@mellanox.com>
Fri, 3 Aug 2018 09:08:47 +0000 (11:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Aug 2018 16:44:37 +0000 (09:44 -0700)
commit5ca8a25c144dbb04511147601943691baab0aaca
treefefa5952150439a38620e7d2a704dd31d2e8d81e
parent6fd544c897d98bc6f185da215f1585dc144218cc
net: sched: fix flush on non-existing chain

User was able to perform filter flush on chain 0 even if it didn't have
any filters in it. With the patch that avoided implicit chain 0
creation, this changed. So in case user wants filter flush on chain
which does not exist, just return success. There's no reason for non-0
chains to behave differently than chain 0, so do the same for them.

Reported-by: Ido Schimmel <idosch@mellanox.com>
Fixes: f71e0ca4db18 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c