diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 021a48e8a5e2..c6215e2b9d7f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2446,6 +2446,9 @@ static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *a | |||
2446 | struct fib6_config cfg; | 2446 | struct fib6_config cfg; |
2447 | int err; | 2447 | int err; |
2448 | 2448 | ||
2449 | if (!capable(CAP_NET_ADMIN)) | ||
2450 | return -EPERM; | ||
2451 | |||
2449 | err = rtm_to_fib6_config(skb, nlh, &cfg); | 2452 | err = rtm_to_fib6_config(skb, nlh, &cfg); |
2450 | if (err < 0) | 2453 | if (err < 0) |
2451 | return err; | 2454 | return err; |
@@ -2461,6 +2464,9 @@ static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *a | |||
2461 | struct fib6_config cfg; | 2464 | struct fib6_config cfg; |
2462 | int err; | 2465 | int err; |
2463 | 2466 | ||
2467 | if (!capable(CAP_NET_ADMIN)) | ||
2468 | return -EPERM; | ||
2469 | |||
2464 | err = rtm_to_fib6_config(skb, nlh, &cfg); | 2470 | err = rtm_to_fib6_config(skb, nlh, &cfg); |
2465 | if (err < 0) | 2471 | if (err < 0) |
2466 | return err; | 2472 | return err; |