aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/proto.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 01:46:16 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:46:16 -0500
commitdec73ff0293d59076d1fd8f4a264898ecfc457ec (patch)
tree251a87b4b98d073fcd3753e01eea5ea44aaf9570 /net/dccp/proto.c
parentd1d47beef8ecaeedc368f00780d02cfa5e540005 (diff)
[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/proto.c')
-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 59b214995f28..6d7aef9647de 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -522,14 +522,10 @@ EXPORT_SYMBOL_GPL(dccp_setsockopt);
522int compat_dccp_setsockopt(struct sock *sk, int level, int optname, 522int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
523 char __user *optval, int optlen) 523 char __user *optval, int optlen)
524{ 524{
525 if (level != SOL_DCCP) { 525 if (level != SOL_DCCP)
526 if (inet_csk(sk)->icsk_af_ops->compat_setsockopt) 526 return inet_csk_compat_setsockopt(sk, level, optname,
527 return inet_csk(sk)->icsk_af_ops->compat_setsockopt(sk, 527 optval, optlen);
528 level, optname, optval, optlen); 528
529 else
530 return inet_csk(sk)->icsk_af_ops->setsockopt(sk,
531 level, optname, optval, optlen);
532 }
533 return do_dccp_setsockopt(sk, level, optname, optval, optlen); 529 return do_dccp_setsockopt(sk, level, optname, optval, optlen);
534} 530}
535EXPORT_SYMBOL_GPL(compat_dccp_setsockopt); 531EXPORT_SYMBOL_GPL(compat_dccp_setsockopt);
@@ -619,14 +615,9 @@ EXPORT_SYMBOL_GPL(dccp_getsockopt);
619int compat_dccp_getsockopt(struct sock *sk, int level, int optname, 615int compat_dccp_getsockopt(struct sock *sk, int level, int optname,
620 char __user *optval, int __user *optlen) 616 char __user *optval, int __user *optlen)
621{ 617{
622 if (level != SOL_DCCP) { 618 if (level != SOL_DCCP)
623 if (inet_csk(sk)->icsk_af_ops->compat_setsockopt) 619 return inet_csk_compat_getsockopt(sk, level, optname,
624 return inet_csk(sk)->icsk_af_ops->compat_getsockopt(sk, 620 optval, optlen);
625 level, optname, optval, optlen);
626 else
627 return inet_csk(sk)->icsk_af_ops->getsockopt(sk,
628 level, optname, optval, optlen);
629 }
630 return do_dccp_getsockopt(sk, level, optname, optval, optlen); 621 return do_dccp_getsockopt(sk, level, optname, optval, optlen);
631} 622}
632EXPORT_SYMBOL_GPL(compat_dccp_getsockopt); 623EXPORT_SYMBOL_GPL(compat_dccp_getsockopt);