aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/minisocks.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-11-05 02:55:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-05 02:55:49 -0500
commitac75773c2742d82cbcb078708df406e9017224b7 (patch)
tree7e7b1aa5131c4a61aabd9d86d7332eca98d66a89 /net/dccp/minisocks.c
parent61e6473efbd6087e1db3aaa93a5266c5bfd8aa99 (diff)
dccp: Per-socket initialisation of feature negotiation
This provides feature-negotiation initialisation for both DCCP sockets and DCCP request_sockets, to support feature negotiation during connection setup. It also resolves a FIXME regarding the congestion control initialisation. Thanks to Wei Yongjun for help with the IPv6 side of this patch. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r--net/dccp/minisocks.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index e6bf99e3e41a..afdacbb94d75 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -125,6 +125,7 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
125 newdp->dccps_timestamp_time = dreq->dreq_timestamp_time; 125 newdp->dccps_timestamp_time = dreq->dreq_timestamp_time;
126 newicsk->icsk_rto = DCCP_TIMEOUT_INIT; 126 newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
127 127
128 INIT_LIST_HEAD(&newdp->dccps_featneg);
128 if (dccp_feat_clone(sk, newsk)) 129 if (dccp_feat_clone(sk, newsk))
129 goto out_free; 130 goto out_free;
130 131
@@ -304,7 +305,8 @@ void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
304 305
305EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack); 306EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack);
306 307
307void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb) 308int dccp_reqsk_init(struct request_sock *req,
309 struct dccp_sock const *dp, struct sk_buff const *skb)
308{ 310{
309 struct dccp_request_sock *dreq = dccp_rsk(req); 311 struct dccp_request_sock *dreq = dccp_rsk(req);
310 312
@@ -313,6 +315,9 @@ void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)
313 inet_rsk(req)->acked = 0; 315 inet_rsk(req)->acked = 0;
314 req->rcv_wnd = sysctl_dccp_feat_sequence_window; 316 req->rcv_wnd = sysctl_dccp_feat_sequence_window;
315 dreq->dreq_timestamp_echo = 0; 317 dreq->dreq_timestamp_echo = 0;
318
319 /* inherit feature negotiation options from listening socket */
320 return dccp_feat_clone_list(&dp->dccps_featneg, &dreq->dreq_featneg);
316} 321}
317 322
318EXPORT_SYMBOL_GPL(dccp_reqsk_init); 323EXPORT_SYMBOL_GPL(dccp_reqsk_init);