diff options
Diffstat (limited to 'net/decnet/dn_fib.c')
-rw-r--r-- | net/decnet/dn_fib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 102d6106a942..e36614eccc04 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -520,6 +520,9 @@ static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void * | |||
520 | struct rtattr **rta = arg; | 520 | struct rtattr **rta = arg; |
521 | struct rtmsg *r = NLMSG_DATA(nlh); | 521 | struct rtmsg *r = NLMSG_DATA(nlh); |
522 | 522 | ||
523 | if (!capable(CAP_NET_ADMIN)) | ||
524 | return -EPERM; | ||
525 | |||
523 | if (!net_eq(net, &init_net)) | 526 | if (!net_eq(net, &init_net)) |
524 | return -EINVAL; | 527 | return -EINVAL; |
525 | 528 | ||
@@ -540,6 +543,9 @@ static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void * | |||
540 | struct rtattr **rta = arg; | 543 | struct rtattr **rta = arg; |
541 | struct rtmsg *r = NLMSG_DATA(nlh); | 544 | struct rtmsg *r = NLMSG_DATA(nlh); |
542 | 545 | ||
546 | if (!capable(CAP_NET_ADMIN)) | ||
547 | return -EPERM; | ||
548 | |||
543 | if (!net_eq(net, &init_net)) | 549 | if (!net_eq(net, &init_net)) |
544 | return -EINVAL; | 550 | return -EINVAL; |
545 | 551 | ||