Skip to content

Commit 9833d6d

Browse files
Arnaldo Carvalho de Melodavem330
authored andcommitted
[DCCP]: Don't alloc ack vector for the control sock
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d5e9b2c commit 9833d6d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

net/dccp/ipv4.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,12 +1041,6 @@ int dccp_v4_init_sock(struct sock *sk)
10411041
dccp_options_init(&dp->dccps_options);
10421042
do_gettimeofday(&dp->dccps_epoch);
10431043

1044-
if (dp->dccps_options.dccpo_send_ack_vector) {
1045-
dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL);
1046-
if (dp->dccps_hc_rx_ackvec == NULL)
1047-
return -ENOMEM;
1048-
}
1049-
10501044
/*
10511045
* FIXME: We're hardcoding the CCID, and doing this at this point makes
10521046
* the listening (master) sock get CCID control blocks, which is not
@@ -1055,6 +1049,11 @@ int dccp_v4_init_sock(struct sock *sk)
10551049
* setsockopt(CCIDs-I-want/accept). -acme
10561050
*/
10571051
if (likely(!dccp_ctl_socket_init)) {
1052+
if (dp->dccps_options.dccpo_send_ack_vector) {
1053+
dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL);
1054+
if (dp->dccps_hc_rx_ackvec == NULL)
1055+
return -ENOMEM;
1056+
}
10581057
dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_rx_ccid,
10591058
sk);
10601059
dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_tx_ccid,

0 commit comments

Comments
 (0)