]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: reject unknown tcfa_action values
authorPaolo Abeni <pabeni@redhat.com>
Wed, 29 Aug 2018 08:22:33 +0000 (10:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2018 05:10:59 +0000 (22:10 -0700)
commit6c77d8481e6b8eb4c5f5be86ed7bfe840e2b4401
treeeb49c6777a411787afb9947a29ddd30aae39c111
parentfe3d9b1ea2cf39adb3dbd871393b13b43c503211
net_sched: reject unknown tcfa_action values

After the commit e2e608b1c90d ("net/sched: user-space can't set
unknown tcfa_action values"), unknown tcfa_action values are
converted to TC_ACT_UNSPEC, but the common agreement is instead
rejecting such configurations.

This change also introduces a helper to simplify the destruction
of a single action, avoiding code duplication.

v1 -> v2:
 - helper is now static and renamed according to act_* convention
 - updated extack message, according to the new behavior

Fixes: e2e608b1c90d ("net/sched: user-space can't set unknown tcfa_action values")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_api.c