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>
This commit is contained in:

committed by
David S. Miller

parent
61e6473efb
commit
ac75773c27
@@ -125,6 +125,7 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
|
||||
newdp->dccps_timestamp_time = dreq->dreq_timestamp_time;
|
||||
newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
|
||||
|
||||
INIT_LIST_HEAD(&newdp->dccps_featneg);
|
||||
if (dccp_feat_clone(sk, newsk))
|
||||
goto out_free;
|
||||
|
||||
@@ -304,7 +305,8 @@ void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack);
|
||||
|
||||
void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)
|
||||
int dccp_reqsk_init(struct request_sock *req,
|
||||
struct dccp_sock const *dp, struct sk_buff const *skb)
|
||||
{
|
||||
struct dccp_request_sock *dreq = dccp_rsk(req);
|
||||
|
||||
@@ -313,6 +315,9 @@ void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)
|
||||
inet_rsk(req)->acked = 0;
|
||||
req->rcv_wnd = sysctl_dccp_feat_sequence_window;
|
||||
dreq->dreq_timestamp_echo = 0;
|
||||
|
||||
/* inherit feature negotiation options from listening socket */
|
||||
return dccp_feat_clone_list(&dp->dccps_featneg, &dreq->dreq_featneg);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(dccp_reqsk_init);
|
||||
|
Reference in New Issue
Block a user