X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=net%2Fdccp%2Fdiag.c;h=b21f261da75ee2572e40ce44f44746c3ee899e7a;hb=7522948b1b6105d58d250d3225f86aa0a5ba2bc5;hp=93aae7c95550d8182c8031c780e83513600ff0f7;hpb=0a68a20cc3eafa73bb54097c28b921147d7d3685;p=cascardo%2Flinux.git diff --git a/net/dccp/diag.c b/net/dccp/diag.c index 93aae7c95550..b21f261da75e 100644 --- a/net/dccp/diag.c +++ b/net/dccp/diag.c @@ -32,8 +32,11 @@ static void dccp_get_info(struct sock *sk, struct tcp_info *info) if (dp->dccps_hc_rx_ackvec != NULL) info->tcpi_options |= TCPI_OPT_SACK; - ccid_hc_rx_get_info(dp->dccps_hc_rx_ccid, sk, info); - ccid_hc_tx_get_info(dp->dccps_hc_tx_ccid, sk, info); + if (dp->dccps_hc_rx_ccid != NULL) + ccid_hc_rx_get_info(dp->dccps_hc_rx_ccid, sk, info); + + if (dp->dccps_hc_tx_ccid != NULL) + ccid_hc_tx_get_info(dp->dccps_hc_tx_ccid, sk, info); } 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, dccp_get_info(sk, _info); } -static struct inet_diag_handler dccp_diag_handler = { +static const struct inet_diag_handler dccp_diag_handler = { .idiag_hashinfo = &dccp_hashinfo, .idiag_get_info = dccp_diag_get_info, .idiag_type = DCCPDIAG_GETSOCK,