aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-23 23:32:42 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:11:15 -0500
commit6d834e04e596d6803cf1074a07fd67e7b5662f1b (patch)
treeb11ec3d738e707772fe193a9feb99f7a4c552f42 /net/sched
parentb03f4672007e533c8dbf0965f995182586216bf1 (diff)
[NET_SCHED]: act_api: fix netlink API conversion bug
Fix two invalid attribute accesses, indices start at 1 with the new netlink API. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index ebd21d2cb5f1..ae077ed208af 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -997,11 +997,11 @@ find_dump_kind(struct nlmsghdr *n)
997 if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1), 997 if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1),
998 NLMSG_ALIGN(nla_len(tb1)), NULL) < 0) 998 NLMSG_ALIGN(nla_len(tb1)), NULL) < 0)
999 return NULL; 999 return NULL;
1000 if (tb[0] == NULL)
1001 return NULL;
1002 1000
1003 if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[0]), 1001 if (tb[1] == NULL)
1004 nla_len(tb[0]), NULL) < 0) 1002 return NULL;
1003 if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]),
1004 nla_len(tb[1]), NULL) < 0)
1005 return NULL; 1005 return NULL;
1006 kind = tb2[TCA_ACT_KIND]; 1006 kind = tb2[TCA_ACT_KIND];
1007 1007