diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-03-21 01:51:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:51:53 -0500 |
commit | 8ca0d17bd716c0aa3f496714e0e304fc6b982ae3 (patch) | |
tree | a1e3881117aa4b687bacace28c794e7cc3522827 /net/dccp/proto.c | |
parent | a4bf3902427a128455b8de299ff0918072b2e974 (diff) |
[DCCP] feat: Pass dccp_minisock ptr where only the minisock is used
This is in preparation for having a dccp_minisock embedded into
dccp_request_sock so that feature negotiation can be done prior to
creating the full blown dccp_sock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index ede969074967..d4b293e16283 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -180,7 +180,7 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | |||
180 | * setsockopt(CCIDs-I-want/accept). -acme | 180 | * setsockopt(CCIDs-I-want/accept). -acme |
181 | */ | 181 | */ |
182 | if (likely(ctl_sock_initialized)) { | 182 | if (likely(ctl_sock_initialized)) { |
183 | int rc = dccp_feat_init(sk); | 183 | int rc = dccp_feat_init(dmsk); |
184 | 184 | ||
185 | if (rc) | 185 | if (rc) |
186 | return rc; | 186 | return rc; |
@@ -229,6 +229,7 @@ EXPORT_SYMBOL_GPL(dccp_init_sock); | |||
229 | int dccp_destroy_sock(struct sock *sk) | 229 | int dccp_destroy_sock(struct sock *sk) |
230 | { | 230 | { |
231 | struct dccp_sock *dp = dccp_sk(sk); | 231 | struct dccp_sock *dp = dccp_sk(sk); |
232 | struct dccp_minisock *dmsk = dccp_msk(sk); | ||
232 | 233 | ||
233 | /* | 234 | /* |
234 | * DCCP doesn't use sk_write_queue, just sk_send_head | 235 | * DCCP doesn't use sk_write_queue, just sk_send_head |
@@ -246,7 +247,7 @@ int dccp_destroy_sock(struct sock *sk) | |||
246 | kfree(dp->dccps_service_list); | 247 | kfree(dp->dccps_service_list); |
247 | dp->dccps_service_list = NULL; | 248 | dp->dccps_service_list = NULL; |
248 | 249 | ||
249 | if (dccp_msk(sk)->dccpms_send_ack_vector) { | 250 | if (dmsk->dccpms_send_ack_vector) { |
250 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); | 251 | dccp_ackvec_free(dp->dccps_hc_rx_ackvec); |
251 | dp->dccps_hc_rx_ackvec = NULL; | 252 | dp->dccps_hc_rx_ackvec = NULL; |
252 | } | 253 | } |
@@ -255,7 +256,7 @@ int dccp_destroy_sock(struct sock *sk) | |||
255 | dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; | 256 | dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; |
256 | 257 | ||
257 | /* clean up feature negotiation state */ | 258 | /* clean up feature negotiation state */ |
258 | dccp_feat_clean(sk); | 259 | dccp_feat_clean(dmsk); |
259 | 260 | ||
260 | return 0; | 261 | return 0; |
261 | } | 262 | } |
@@ -441,8 +442,8 @@ static int dccp_setsockopt_change(struct sock *sk, int type, | |||
441 | goto out_free_val; | 442 | goto out_free_val; |
442 | } | 443 | } |
443 | 444 | ||
444 | rc = dccp_feat_change(sk, type, opt.dccpsf_feat, val, opt.dccpsf_len, | 445 | rc = dccp_feat_change(dccp_msk(sk), type, opt.dccpsf_feat, |
445 | GFP_KERNEL); | 446 | val, opt.dccpsf_len, GFP_KERNEL); |
446 | if (rc) | 447 | if (rc) |
447 | goto out_free_val; | 448 | goto out_free_val; |
448 | 449 | ||