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:
Cong Wang 2014-04-04 18:15:16 -07:00 committed by Thomas Haller
parent 5206c05050
commit 690545a20e

View file

@ -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) {