route: fix off-by-one in rtnl_act_parse()

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-03-26 22:43:16 -07:00 committed by Thomas Haller
parent a593803ad6
commit baa2cadd02

View file

@ -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;