diff options
author | Jamal Hadi Salim <jhs@mojatatu.com> | 2017-07-30 19:24:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-31 04:28:08 +0200 |
commit | df823b02970172f3e4003063699e333295b9b32d (patch) | |
tree | 76d928948e7fdbb8ba148f954a8b496581d5fbe7 | |
parent | net netlink: Add new type NLA_BITFIELD32 (diff) | |
download | linux-df823b02970172f3e4003063699e333295b9b32d.tar.xz linux-df823b02970172f3e4003063699e333295b9b32d.zip |
net sched actions: Use proper root attribute table for actions
Bug fix for an issue which has been around for about a decade.
We got away with it because the enumeration was larger than needed.
Fixes: 7ba699c604ab ("[NET_SCHED]: Convert actions from rtnetlink to new netlink API")
Suggested-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sched/act_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index f2e9ed34a963..848370e2fcca 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -1072,7 +1072,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); - struct nlattr *tca[TCA_ACT_MAX + 1]; + struct nlattr *tca[TCAA_MAX + 1]; u32 portid = skb ? NETLINK_CB(skb).portid : 0; int ret = 0, ovr = 0; @@ -1080,7 +1080,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, !netlink_capable(skb, CAP_NET_ADMIN)) return -EPERM; - ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL, + ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCAA_MAX, NULL, extack); if (ret < 0) return ret; |