diff options
-rw-r--r-- | Documentation/networking/dccp.txt | 3 | ||||
-rw-r--r-- | include/linux/dccp.h | 1 | ||||
-rw-r--r-- | net/dccp/proto.c | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 477026ae0ffb..f9157180f7d8 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -41,6 +41,9 @@ the socket will fall back to 0 (which means that no meaningful service code | |||
41 | is present). Connecting sockets set at most one service option; for | 41 | is present). Connecting sockets set at most one service option; for |
42 | listening sockets, multiple service codes can be specified. | 42 | listening sockets, multiple service codes can be specified. |
43 | 43 | ||
44 | DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet | ||
45 | size (application payload size) in bytes, see RFC 4340, section 14. | ||
46 | |||
44 | DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the | 47 | DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the |
45 | partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums | 48 | partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums |
46 | always cover the entire packet and that only fully covered application data is | 49 | always cover the entire packet and that only fully covered application data is |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 4ed82e2c9f65..0e44a3e5208d 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -202,6 +202,7 @@ struct dccp_so_feat { | |||
202 | #define DCCP_SOCKOPT_SERVICE 2 | 202 | #define DCCP_SOCKOPT_SERVICE 2 |
203 | #define DCCP_SOCKOPT_CHANGE_L 3 | 203 | #define DCCP_SOCKOPT_CHANGE_L 3 |
204 | #define DCCP_SOCKOPT_CHANGE_R 4 | 204 | #define DCCP_SOCKOPT_CHANGE_R 4 |
205 | #define DCCP_SOCKOPT_GET_CUR_MPS 5 | ||
205 | #define DCCP_SOCKOPT_SEND_CSCOV 10 | 206 | #define DCCP_SOCKOPT_SEND_CSCOV 10 |
206 | #define DCCP_SOCKOPT_RECV_CSCOV 11 | 207 | #define DCCP_SOCKOPT_RECV_CSCOV 11 |
207 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | 208 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 7e4f54a4ecaf..c0b685efe245 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -587,6 +587,10 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname, | |||
587 | case DCCP_SOCKOPT_SERVICE: | 587 | case DCCP_SOCKOPT_SERVICE: |
588 | return dccp_getsockopt_service(sk, len, | 588 | return dccp_getsockopt_service(sk, len, |
589 | (__be32 __user *)optval, optlen); | 589 | (__be32 __user *)optval, optlen); |
590 | case DCCP_SOCKOPT_GET_CUR_MPS: | ||
591 | val = dp->dccps_mss_cache; | ||
592 | len = sizeof(val); | ||
593 | break; | ||
590 | case DCCP_SOCKOPT_SEND_CSCOV: | 594 | case DCCP_SOCKOPT_SEND_CSCOV: |
591 | val = dp->dccps_pcslen; | 595 | val = dp->dccps_pcslen; |
592 | len = sizeof(val); | 596 | len = sizeof(val); |