act: fix policy range check
mirred action should accept all TC_ACT* policy Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
5206c05050
commit
690545a20e
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ int rtnl_mirred_set_policy(struct rtnl_act *act, int policy)
|
|||
if (!(u = (struct rtnl_mirred *) rtnl_tc_data(TC_CAST(act))))
|
||||
return -NLE_NOMEM;
|
||||
|
||||
if (policy > TC_POLICE_PIPE || policy < TC_POLICE_OK)
|
||||
if (policy > TC_ACT_REPEAT || policy < TC_ACT_OK)
|
||||
return -NLE_INVAL;
|
||||
|
||||
switch (u->m_parm.eaction) {
|
||||
|
|
Loading…
Add table
Reference in a new issue