]> Pileus Git - ~andy/linux/blobdiff - net/dcb/dcbnl.c
net: Push capable(CAP_NET_ADMIN) into the rtnl methods
[~andy/linux] / net / dcb / dcbnl.c
index 70989e672304938a39cdf7b7a0dfd87b7497d2a9..b07c75d37e91702f90d7c4ab2a39d15aacce3e48 100644 (file)
@@ -1662,6 +1662,9 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
        struct nlmsghdr *reply_nlh = NULL;
        const struct reply_func *fn;
 
+       if ((nlh->nlmsg_type == RTM_SETDCB) && !capable(CAP_NET_ADMIN))
+               return -EPERM;
+
        if (!net_eq(net, &init_net))
                return -EINVAL;