diff options
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index dd63cdea3fe7..1a7e6eac90b0 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1386,14 +1386,14 @@ int sock_common_getsockopt(struct socket *sock, int level, int optname, | |||
1386 | EXPORT_SYMBOL(sock_common_getsockopt); | 1386 | EXPORT_SYMBOL(sock_common_getsockopt); |
1387 | 1387 | ||
1388 | #ifdef CONFIG_COMPAT | 1388 | #ifdef CONFIG_COMPAT |
1389 | int compat_sock_common_getsockopt(struct socket *sock, int level, | 1389 | int compat_sock_common_getsockopt(struct socket *sock, int level, int optname, |
1390 | int optname, char __user *optval, int __user *optlen) | 1390 | char __user *optval, int __user *optlen) |
1391 | { | 1391 | { |
1392 | struct sock *sk = sock->sk; | 1392 | struct sock *sk = sock->sk; |
1393 | 1393 | ||
1394 | if (sk->sk_prot->compat_setsockopt) | 1394 | if (sk->sk_prot->compat_setsockopt != NULL) |
1395 | return sk->sk_prot->compat_getsockopt(sk, level, | 1395 | return sk->sk_prot->compat_getsockopt(sk, level, optname, |
1396 | optname, optval, optlen); | 1396 | optval, optlen); |
1397 | return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); | 1397 | return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); |
1398 | } | 1398 | } |
1399 | EXPORT_SYMBOL(compat_sock_common_getsockopt); | 1399 | EXPORT_SYMBOL(compat_sock_common_getsockopt); |
@@ -1429,14 +1429,14 @@ int sock_common_setsockopt(struct socket *sock, int level, int optname, | |||
1429 | EXPORT_SYMBOL(sock_common_setsockopt); | 1429 | EXPORT_SYMBOL(sock_common_setsockopt); |
1430 | 1430 | ||
1431 | #ifdef CONFIG_COMPAT | 1431 | #ifdef CONFIG_COMPAT |
1432 | int compat_sock_common_setsockopt(struct socket *sock, | 1432 | int compat_sock_common_setsockopt(struct socket *sock, int level, int optname, |
1433 | int level, int optname, char __user *optval, int optlen) | 1433 | char __user *optval, int optlen) |
1434 | { | 1434 | { |
1435 | struct sock *sk = sock->sk; | 1435 | struct sock *sk = sock->sk; |
1436 | 1436 | ||
1437 | if (sk->sk_prot->compat_setsockopt) | 1437 | if (sk->sk_prot->compat_setsockopt != NULL) |
1438 | return sk->sk_prot->compat_setsockopt(sk, level, | 1438 | return sk->sk_prot->compat_setsockopt(sk, level, optname, |
1439 | optname, optval, optlen); | 1439 | optval, optlen); |
1440 | return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); | 1440 | return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); |
1441 | } | 1441 | } |
1442 | EXPORT_SYMBOL(compat_sock_common_setsockopt); | 1442 | EXPORT_SYMBOL(compat_sock_common_setsockopt); |