[DCCP]: Allow to parse options on Request Sockets
The option parsing code currently only parses on full sk's. This causes a problem for options sent during the initial handshake (in particular timestamps and feature-negotiation options). Therefore, this patch extends the option parsing code with an additional argument for request_socks: if it is non-NULL, options are parsed on the request socket, otherwise the normal path (parsing on the sk) is used. Subsequent patches, which implement feature negotiation during connection setup, make use of this facility. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7913350663
commit
8b81941248
@@ -415,11 +415,12 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
if (req == NULL)
|
||||
goto drop;
|
||||
|
||||
if (dccp_parse_options(sk, skb))
|
||||
goto drop_and_free;
|
||||
|
||||
dccp_reqsk_init(req, skb);
|
||||
|
||||
dreq = dccp_rsk(req);
|
||||
if (dccp_parse_options(sk, dreq, skb))
|
||||
goto drop_and_free;
|
||||
|
||||
if (security_inet_conn_request(sk, skb, req))
|
||||
goto drop_and_free;
|
||||
|
||||
@@ -449,7 +450,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
* In fact we defer setting S.GSR, S.SWL, S.SWH to
|
||||
* dccp_create_openreq_child.
|
||||
*/
|
||||
dreq = dccp_rsk(req);
|
||||
dreq->dreq_isr = dcb->dccpd_seq;
|
||||
dreq->dreq_iss = dccp_v6_init_sequence(skb);
|
||||
dreq->dreq_service = service;
|
||||
|
Reference in New Issue
Block a user