diff options
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 8a6d0a83047c..ede969074967 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -166,9 +166,10 @@ EXPORT_SYMBOL_GPL(dccp_unhash); | |||
166 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | 166 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) |
167 | { | 167 | { |
168 | struct dccp_sock *dp = dccp_sk(sk); | 168 | struct dccp_sock *dp = dccp_sk(sk); |
169 | struct dccp_minisock *dmsk = dccp_msk(sk); | ||
169 | struct inet_connection_sock *icsk = inet_csk(sk); | 170 | struct inet_connection_sock *icsk = inet_csk(sk); |
170 | 171 | ||
171 | dccp_options_init(&dp->dccps_options); | 172 | dccp_minisock_init(&dp->dccps_minisock); |
172 | do_gettimeofday(&dp->dccps_epoch); | 173 | do_gettimeofday(&dp->dccps_epoch); |
173 | 174 | ||
174 | /* | 175 | /* |
@@ -184,22 +185,20 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
184 | if (rc) | 185 | if (rc) |
185 | return rc; | 186 | return rc; |
186 | 187 | ||
187 | if (dp->dccps_options.dccpo_send_ack_vector) { | 188 | if (dmsk->dccpms_send_ack_vector) { |
188 | dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL); | 189 | dp->dccps_hc_rx_ackvec = dccp_ackvec_alloc(GFP_KERNEL); |
189 | if (dp->dccps_hc_rx_ackvec == NULL) | 190 | if (dp->dccps_hc_rx_ackvec == NULL) |
190 | return -ENOMEM; | 191 | return -ENOMEM; |
191 | } | 192 | } |
192 | dp->dccps_hc_rx_ccid = | 193 | dp->dccps_hc_rx_ccid = ccid_hc_rx_new(dmsk->dccpms_rx_ccid, |
193 | ccid_hc_rx_new(dp->dccps_options.dccpo_rx_ccid, | 194 | sk, GFP_KERNEL); |
194 | sk, GFP_KERNEL); | 195 | dp->dccps_hc_tx_ccid = ccid_hc_tx_new(dmsk->dccpms_tx_ccid, |
195 | dp->dccps_hc_tx_ccid = | 196 | sk, GFP_KERNEL); |
196 | ccid_hc_tx_new(dp->dccps_options.dccpo_tx_ccid, | ||
197 | sk, GFP_KERNEL); | ||
198 | if (unlikely(dp->dccps_hc_rx_ccid == NULL || | 197 | if (unlikely(dp->dccps_hc_rx_ccid == NULL || |
199 | dp->dccps_hc_tx_ccid == NULL)) { | 198 | dp->dccps_hc_tx_ccid == NULL)) { |
200 | ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); | 199 | ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); |
201 | ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); | 200 | ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); |
202 | if (dp->dccps_options.dccpo_send_ack_vector) { | 201 | if (dmsk->dccpms_send_ack_vector) { |
203 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); | 202 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); |
204 | dp->dccps_hc_rx_ackvec = NULL; | 203 | dp->dccps_hc_rx_ackvec = NULL; |
205 | } | 204 | } |
@@ -208,8 +207,8 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
208 | } | 207 | } |
209 | } else { | 208 | } else { |
210 | /* control socket doesn't need feat nego */ | 209 | /* control socket doesn't need feat nego */ |
211 | INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending); | 210 | INIT_LIST_HEAD(&dmsk->dccpms_pending); |
212 | INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf); | 211 | INIT_LIST_HEAD(&dmsk->dccpms_conf); |
213 | } | 212 | } |
214 | 213 | ||
215 | dccp_init_xmit_timers(sk); | 214 | dccp_init_xmit_timers(sk); |
@@ -247,7 +246,7 @@ int dccp_destroy_sock(struct sock *sk) | |||
247 | kfree(dp->dccps_service_list); | 246 | kfree(dp->dccps_service_list); |
248 | dp->dccps_service_list = NULL; | 247 | dp->dccps_service_list = NULL; |
249 | 248 | ||
250 | if (dp->dccps_options.dccpo_send_ack_vector) { | 249 | if (dccp_msk(sk)->dccpms_send_ack_vector) { |
251 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); | 250 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); |
252 | dp->dccps_hc_rx_ackvec = NULL; | 251 | dp->dccps_hc_rx_ackvec = NULL; |
253 | } | 252 | } |