Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d834e04 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b03f4672
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -997,11 +997,11 @@ find_dump_kind(struct nlmsghdr *n)
	if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1),
		      NLMSG_ALIGN(nla_len(tb1)), NULL) < 0)
		return NULL;
	if (tb[0] == NULL)
		return NULL;

	if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[0]),
		      nla_len(tb[0]), NULL) < 0)
	if (tb[1] == NULL)
		return NULL;
	if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]),
		      nla_len(tb[1]), NULL) < 0)
		return NULL;
	kind = tb2[TCA_ACT_KIND];