summaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-20 22:46:16 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 22:46:16 -0800
commitdec73ff0293d59076d1fd8f4a264898ecfc457ec (patch)
tree251a87b4b98d073fcd3753e01eea5ea44aaf9570 /net/dccp
parentd1d47beef8ecaeedc368f00780d02cfa5e540005 (diff)
downloadop-kernel-dev-dec73ff0293d59076d1fd8f4a264898ecfc457ec.zip
op-kernel-dev-dec73ff0293d59076d1fd8f4a264898ecfc457ec.tar.gz
[ICSK] compat: Introduce inet_csk_compat_[gs]etsockopt
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/proto.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 59b2149..6d7aef9 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -522,14 +522,10 @@ EXPORT_SYMBOL_GPL(dccp_setsockopt);
int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, int optlen)
{
- if (level != SOL_DCCP) {
- if (inet_csk(sk)->icsk_af_ops->compat_setsockopt)
- return inet_csk(sk)->icsk_af_ops->compat_setsockopt(sk,
- level, optname, optval, optlen);
- else
- return inet_csk(sk)->icsk_af_ops->setsockopt(sk,
- level, optname, optval, optlen);
- }
+ if (level != SOL_DCCP)
+ return inet_csk_compat_setsockopt(sk, level, optname,
+ optval, optlen);
+
return do_dccp_setsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL_GPL(compat_dccp_setsockopt);
@@ -619,14 +615,9 @@ EXPORT_SYMBOL_GPL(dccp_getsockopt);
int compat_dccp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
- if (level != SOL_DCCP) {
- if (inet_csk(sk)->icsk_af_ops->compat_setsockopt)
- return inet_csk(sk)->icsk_af_ops->compat_getsockopt(sk,
- level, optname, optval, optlen);
- else
- return inet_csk(sk)->icsk_af_ops->getsockopt(sk,
- level, optname, optval, optlen);
- }
+ if (level != SOL_DCCP)
+ return inet_csk_compat_getsockopt(sk, level, optname,
+ optval, optlen);
return do_dccp_getsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL_GPL(compat_dccp_getsockopt);
OpenPOWER on IntegriCloud