aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/proto.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index cc87c500bfb8..0bed4a6095b7 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -657,19 +657,15 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
657 (__be32 __user *)optval, optlen); 657 (__be32 __user *)optval, optlen);
658 case DCCP_SOCKOPT_GET_CUR_MPS: 658 case DCCP_SOCKOPT_GET_CUR_MPS:
659 val = dp->dccps_mss_cache; 659 val = dp->dccps_mss_cache;
660 len = sizeof(val);
661 break; 660 break;
662 case DCCP_SOCKOPT_SERVER_TIMEWAIT: 661 case DCCP_SOCKOPT_SERVER_TIMEWAIT:
663 val = dp->dccps_server_timewait; 662 val = dp->dccps_server_timewait;
664 len = sizeof(val);
665 break; 663 break;
666 case DCCP_SOCKOPT_SEND_CSCOV: 664 case DCCP_SOCKOPT_SEND_CSCOV:
667 val = dp->dccps_pcslen; 665 val = dp->dccps_pcslen;
668 len = sizeof(val);
669 break; 666 break;
670 case DCCP_SOCKOPT_RECV_CSCOV: 667 case DCCP_SOCKOPT_RECV_CSCOV:
671 val = dp->dccps_pcrlen; 668 val = dp->dccps_pcrlen;
672 len = sizeof(val);
673 break; 669 break;
674 case 128 ... 191: 670 case 128 ... 191:
675 return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname, 671 return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,
@@ -681,6 +677,7 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
681 return -ENOPROTOOPT; 677 return -ENOPROTOOPT;
682 } 678 }
683 679
680 len = sizeof(val);
684 if (put_user(len, optlen) || copy_to_user(optval, &val, len)) 681 if (put_user(len, optlen) || copy_to_user(optval, &val, len))
685 return -EFAULT; 682 return -EFAULT;
686 683