diff options
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r-- | net/sched/act_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 102761d294cb..65d240cbf74b 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -987,6 +987,9 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
987 | u32 portid = skb ? NETLINK_CB(skb).portid : 0; | 987 | u32 portid = skb ? NETLINK_CB(skb).portid : 0; |
988 | int ret = 0, ovr = 0; | 988 | int ret = 0, ovr = 0; |
989 | 989 | ||
990 | if ((n->nlmsg_type != RTM_GETACTION) && !capable(CAP_NET_ADMIN)) | ||
991 | return -EPERM; | ||
992 | |||
990 | ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL); | 993 | ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL); |
991 | if (ret < 0) | 994 | if (ret < 0) |
992 | return ret; | 995 | return ret; |