From 690545a20eb486d4829900378caa1dc4dd5aa0ba Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Fri, 4 Apr 2014 18:15:16 -0700 Subject: [PATCH] act: fix policy range check mirred action should accept all TC_ACT* policy Signed-off-by: Cong Wang Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/act/mirred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/route/act/mirred.c b/lib/route/act/mirred.c index 2668048..d047e24 100644 --- a/lib/route/act/mirred.c +++ b/lib/route/act/mirred.c @@ -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) {