diff options
Diffstat (limited to 'net/dccp/diag.c')
-rw-r--r-- | net/dccp/diag.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/dccp/diag.c b/net/dccp/diag.c index d8a3509b26f6..b21f261da75e 100644 --- a/net/dccp/diag.c +++ b/net/dccp/diag.c | |||
@@ -29,11 +29,14 @@ static void dccp_get_info(struct sock *sk, struct tcp_info *info) | |||
29 | info->tcpi_backoff = icsk->icsk_backoff; | 29 | info->tcpi_backoff = icsk->icsk_backoff; |
30 | info->tcpi_pmtu = icsk->icsk_pmtu_cookie; | 30 | info->tcpi_pmtu = icsk->icsk_pmtu_cookie; |
31 | 31 | ||
32 | if (dccp_msk(sk)->dccpms_send_ack_vector) | 32 | if (dp->dccps_hc_rx_ackvec != NULL) |
33 | info->tcpi_options |= TCPI_OPT_SACK; | 33 | info->tcpi_options |= TCPI_OPT_SACK; |
34 | 34 | ||
35 | ccid_hc_rx_get_info(dp->dccps_hc_rx_ccid, sk, info); | 35 | if (dp->dccps_hc_rx_ccid != NULL) |
36 | ccid_hc_tx_get_info(dp->dccps_hc_tx_ccid, sk, info); | 36 | ccid_hc_rx_get_info(dp->dccps_hc_rx_ccid, sk, info); |
37 | |||
38 | if (dp->dccps_hc_tx_ccid != NULL) | ||
39 | ccid_hc_tx_get_info(dp->dccps_hc_tx_ccid, sk, info); | ||
37 | } | 40 | } |
38 | 41 | ||
39 | static void dccp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, | 42 | static void dccp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, |
@@ -45,7 +48,7 @@ static void dccp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, | |||
45 | dccp_get_info(sk, _info); | 48 | dccp_get_info(sk, _info); |
46 | } | 49 | } |
47 | 50 | ||
48 | static struct inet_diag_handler dccp_diag_handler = { | 51 | static const struct inet_diag_handler dccp_diag_handler = { |
49 | .idiag_hashinfo = &dccp_hashinfo, | 52 | .idiag_hashinfo = &dccp_hashinfo, |
50 | .idiag_get_info = dccp_diag_get_info, | 53 | .idiag_get_info = dccp_diag_get_info, |
51 | .idiag_type = DCCPDIAG_GETSOCK, | 54 | .idiag_type = DCCPDIAG_GETSOCK, |