diff options
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 6168c4dc58b1..3eab2b2ffd34 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1318,6 +1318,10 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi | |||
1318 | if (get_user(v, (u32 __user *)optval)) | 1318 | if (get_user(v, (u32 __user *)optval)) |
1319 | return -EFAULT; | 1319 | return -EFAULT; |
1320 | 1320 | ||
1321 | /* "pimreg%u" should not exceed 16 bytes (IFNAMSIZ) */ | ||
1322 | if (v != RT_TABLE_DEFAULT && v >= 1000000000) | ||
1323 | return -EINVAL; | ||
1324 | |||
1321 | rtnl_lock(); | 1325 | rtnl_lock(); |
1322 | ret = 0; | 1326 | ret = 0; |
1323 | if (sk == rtnl_dereference(mrt->mroute_sk)) { | 1327 | if (sk == rtnl_dereference(mrt->mroute_sk)) { |