diff options
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r-- | net/decnet/dn_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 7b7e561412d3..e47ba9fc4a0e 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -573,6 +573,9 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
573 | struct dn_ifaddr __rcu **ifap; | 573 | struct dn_ifaddr __rcu **ifap; |
574 | int err = -EINVAL; | 574 | int err = -EINVAL; |
575 | 575 | ||
576 | if (!capable(CAP_NET_ADMIN)) | ||
577 | return -EPERM; | ||
578 | |||
576 | if (!net_eq(net, &init_net)) | 579 | if (!net_eq(net, &init_net)) |
577 | goto errout; | 580 | goto errout; |
578 | 581 | ||
@@ -614,6 +617,9 @@ static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
614 | struct dn_ifaddr *ifa; | 617 | struct dn_ifaddr *ifa; |
615 | int err; | 618 | int err; |
616 | 619 | ||
620 | if (!capable(CAP_NET_ADMIN)) | ||
621 | return -EPERM; | ||
622 | |||
617 | if (!net_eq(net, &init_net)) | 623 | if (!net_eq(net, &init_net)) |
618 | return -EINVAL; | 624 | return -EINVAL; |
619 | 625 | ||