]> 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)
commitbbc4078904bb288b266fa1eba9775fa295ce2338
treeeb49c6777a411787afb9947a29ddd30aae39c111
parentfcc917707441219c5d3e58ba4adcf7bae15d40e7
net_sched: reject unknown tcfa_action values

After the commit a573d458b0e6 ("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: a573d458b0e6 ("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