[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
@@ -369,7 +369,7 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
|
||||
if (dccp_check_seqno(sk, skb))
|
||||
goto discard;
|
||||
|
||||
if (dccp_parse_options(sk, skb))
|
||||
if (dccp_parse_options(sk, NULL, skb))
|
||||
goto discard;
|
||||
|
||||
if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
|
||||
@@ -427,7 +427,7 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
|
||||
goto out_invalid_packet;
|
||||
}
|
||||
|
||||
if (dccp_parse_options(sk, skb))
|
||||
if (dccp_parse_options(sk, NULL, skb))
|
||||
goto out_invalid_packet;
|
||||
|
||||
/* Obtain usec RTT sample from SYN exchange (used by CCID 3) */
|
||||
@@ -609,7 +609,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
||||
/*
|
||||
* Step 8: Process options and mark acknowledgeable
|
||||
*/
|
||||
if (dccp_parse_options(sk, skb))
|
||||
if (dccp_parse_options(sk, NULL, skb))
|
||||
goto discard;
|
||||
|
||||
if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
|
||||
|
Reference in New Issue
Block a user