]> granicus.if.org Git - libnl/commitdiff
act: fix policy range check
authorCong Wang <xiyou.wangcong@gmail.com>
Sat, 5 Apr 2014 01:15:16 +0000 (18:15 -0700)
committerThomas Haller <thaller@redhat.com>
Mon, 7 Apr 2014 13:23:26 +0000 (15:23 +0200)
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>
lib/route/act/mirred.c

index 266804815c3a50230f97ea0aa14b1cbcd4657eeb..d047e24bd4c710af1f506e901c7e7959895e7f76 100644 (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) {