Commit 515f4f3f authored by Olaf Kirch's avatar Olaf Kirch Committed by David S. Miller

[NET]: Check for SOL_SOCKET in compat_sys_getsockopt

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a06887b
......@@ -507,7 +507,8 @@ static int do_get_sock_timeout(int fd, int level, int optname,
asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
char __user *optval, int __user *optlen)
{
if (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)
if (level == SOL_SOCKET &&
(optname == SO_RCVTIMEO || optname == SO_SNDTIMEO))
return do_get_sock_timeout(fd, level, optname, optval, optlen);
return sys_getsockopt(fd, level, optname, optval, optlen);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment