Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[linux-2.6-microblaze.git] / net / decnet / dn_dev.c
index 7b7e561..e47ba9f 100644 (file)
@@ -573,6 +573,9 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
        struct dn_ifaddr __rcu **ifap;
        int err = -EINVAL;
 
+       if (!capable(CAP_NET_ADMIN))
+               return -EPERM;
+
        if (!net_eq(net, &init_net))
                goto errout;
 
@@ -614,6 +617,9 @@ static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
        struct dn_ifaddr *ifa;
        int err;
 
+       if (!capable(CAP_NET_ADMIN))
+               return -EPERM;
+
        if (!net_eq(net, &init_net))
                return -EINVAL;