[PATCH] fix off-by-one in rtnl_act_parse()
Cong Wang
xiyou.wangcong at gmail.com
Thu Mar 27 01:43:16 EDT 2014
Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
---
lib/route/act.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/route/act.c b/lib/route/act.c
index b908b17..23f9393 100644
--- a/lib/route/act.c
+++ b/lib/route/act.c
@@ -390,7 +390,7 @@ int rtnl_act_parse(struct rtnl_act **head, struct nlattr *tb)
if (err < 0)
return err;
- for (i = 1; i <= TCA_ACT_MAX_PRIO && nla[i]; i++) {
+ for (i = 0; i < TCA_ACT_MAX_PRIO && nla[i]; i++) {
struct rtnl_act *act;
struct rtnl_tc *tc;
--
1.7.11.7
More information about the libnl
mailing list