* [PATCH 3/14]: Integration of dynamic feature activation - part 2 (server side)
@ 2007-10-03 14:02 Gerrit Renker
2007-10-03 18:49 ` Ian McDonald
0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-10-03 14:02 UTC (permalink / raw)
To: dccp
[DCCP]: Integration of dynamic feature activation - part 2 (server side)
This patch integrates the activation of features at the end of negotiation into the
server-side code.
Note: In dccp_create_openreq_child the request_sock argument is no longer constant,
since dccp_activate_values() uses the feature-negotiation list on dreq to
sort out the initialisation values for the different features of the child
socket; and purges this queue after usei (the `req' argument to openreq_child
was kept constant, however).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/minisocks.c | 42 ++++++++++++------------------------------
1 file changed, 12 insertions(+), 30 deletions(-)
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -112,7 +112,7 @@ struct sock *dccp_create_openreq_child(s
struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC);
if (newsk != NULL) {
- const struct dccp_request_sock *dreq = dccp_rsk(req);
+ struct dccp_request_sock *dreq = dccp_rsk(req);
struct inet_connection_sock *newicsk = inet_csk(newsk);
struct dccp_sock *newdp = dccp_sk(newsk);
struct dccp_minisock *newdmsk = dccp_msk(newsk);
@@ -125,35 +125,6 @@ struct sock *dccp_create_openreq_child(s
newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
INIT_LIST_HEAD(&newdp->dccps_featneg);
- if (dccp_feat_clone(sk, newsk))
- goto out_free;
-
- if (newdmsk->dccpms_send_ack_vector) {
- newdp->dccps_hc_rx_ackvec - dccp_ackvec_alloc(GFP_ATOMIC);
- if (unlikely(newdp->dccps_hc_rx_ackvec = NULL))
- goto out_free;
- }
-
- newdp->dccps_hc_rx_ccid - ccid_hc_rx_new(newdmsk->dccpms_rx_ccid,
- newsk, GFP_ATOMIC);
- newdp->dccps_hc_tx_ccid - ccid_hc_tx_new(newdmsk->dccpms_tx_ccid,
- newsk, GFP_ATOMIC);
- if (unlikely(newdp->dccps_hc_rx_ccid = NULL ||
- newdp->dccps_hc_tx_ccid = NULL)) {
- dccp_ackvec_free(newdp->dccps_hc_rx_ackvec);
- ccid_hc_rx_delete(newdp->dccps_hc_rx_ccid, newsk);
- ccid_hc_tx_delete(newdp->dccps_hc_tx_ccid, newsk);
-out_free:
- /* It is still raw copy of parent, so invalidate
- * destructor and make plain sk_free() */
- newsk->sk_destruct = NULL;
- sk_free(newsk);
- return NULL;
- }
-
/*
* Step 3: Process LISTEN state
*
@@ -184,6 +155,17 @@ out_free:
dccp_set_seqno(&newdp->dccps_awl,
max48(newdp->dccps_awl, newdp->dccps_iss));
+ /*
+ * Activate features after initialising the sequence numbers since
+ * CCID initialisation may depend on GSS, ISR, ISS etc.
+ */
+ if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) {
+ /* It is still raw copy of parent, so invalidate
+ * destructor and make plain sk_free() */
+ newsk->sk_destruct = NULL;
+ sk_free(newsk);
+ return NULL;
+ }
dccp_init_xmit_timers(newsk);
DCCP_INC_STATS_BH(DCCP_MIB_PASSIVEOPENS);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 3/14]: Integration of dynamic feature activation - part 2 (server side)
2007-10-03 14:02 [PATCH 3/14]: Integration of dynamic feature activation - part 2 (server side) Gerrit Renker
@ 2007-10-03 18:49 ` Ian McDonald
0 siblings, 0 replies; 2+ messages in thread
From: Ian McDonald @ 2007-10-03 18:49 UTC (permalink / raw)
To: dccp
On 10/4/07, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [DCCP]: Integration of dynamic feature activation - part 2 (server side)
>
> This patch integrates the activation of features at the end of negotiation into the
> server-side code.
>
> Note: In dccp_create_openreq_child the request_sock argument is no longer constant,
> since dccp_activate_values() uses the feature-negotiation list on dreq to
> sort out the initialisation values for the different features of the child
> socket; and purges this queue after usei (the `req' argument to openreq_child
> was kept constant, however).
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-03 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 14:02 [PATCH 3/14]: Integration of dynamic feature activation - part 2 (server side) Gerrit Renker
2007-10-03 18:49 ` Ian McDonald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox