diff options
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 359f48cec99..9f6b44ca28a 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -667,3 +667,33 @@ int inet_csk_ctl_sock_create(struct socket **sock, unsigned short family, | |||
667 | } | 667 | } |
668 | 668 | ||
669 | EXPORT_SYMBOL_GPL(inet_csk_ctl_sock_create); | 669 | EXPORT_SYMBOL_GPL(inet_csk_ctl_sock_create); |
670 | |||
671 | #ifdef CONFIG_COMPAT | ||
672 | int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, | ||
673 | char __user *optval, int __user *optlen) | ||
674 | { | ||
675 | const struct inet_csk *icsk = inet_csk(sk); | ||
676 | |||
677 | if (icsk->icsk_af_ops->compat_getsockopt != NULL) | ||
678 | return icsk->icsk_af_ops->compat_getsockopt(sk, level, optname, | ||
679 | optval, optlen); | ||
680 | return icsk->icsk_af_ops->getsockopt(sk, level, optname, | ||
681 | optval, optlen); | ||
682 | } | ||
683 | |||
684 | EXPORT_SYMBOL_GPL(inet_csk_compat_getsockopt); | ||
685 | |||
686 | int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, | ||
687 | char __user *optval, int optlen) | ||
688 | { | ||
689 | const struct inet_csk *icsk = inet_csk(sk); | ||
690 | |||
691 | if (icsk->icsk_af_ops->compat_setsockopt != NULL) | ||
692 | return icsk->icsk_af_ops->compat_setsockopt(sk, level, optname, | ||
693 | optval, optlen); | ||
694 | return icsk->icsk_af_ops->setsockopt(sk, level, optname, | ||
695 | optval, optlen); | ||
696 | } | ||
697 | |||
698 | EXPORT_SYMBOL_GPL(inet_csk_compat_setsockopt); | ||
699 | #endif | ||