net: Use netlink_ns_capable to verify the permisions of netlink messages
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / sched / cls_api.c
index 8e118af9097345a500e1006bff6fa5c108435603..2ea40d1877a6cce9230b574463b12c637b8ac86e 100644 (file)
@@ -138,7 +138,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
        int err;
        int tp_created = 0;
 
-       if ((n->nlmsg_type != RTM_GETTFILTER) && !capable(CAP_NET_ADMIN))
+       if ((n->nlmsg_type != RTM_GETTFILTER) && !netlink_capable(skb, CAP_NET_ADMIN))
                return -EPERM;
 
 replay: