diff options
author | Samuel Jero <sj323707@ohio.edu> | 2012-02-26 20:22:02 -0500 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2012-03-03 11:02:52 -0500 |
commit | f541fb7e20c848f947ca65fbf169efe69400c942 (patch) | |
tree | 689f3a7a46ca00b6610667e33313f339645b229d /include | |
parent | 793734b587a670e47a8d65f9e5211ba2188bb904 (diff) |
dccp: fix bug in sequence number validation during connection setup
This fixes a bug in the sequence number validation during the initial handshake.
The code did not treat the initial sequence numbers ISS and ISR as read-only and
did not keep state for GSR and GSS as required by the specification. This causes
problems with retransmissions during the initial handshake, causing the
budding connection to be reset.
This patch now treats ISS/ISR as read-only and tracks GSS/GSR as required.
Signed-off-by: Samuel Jero <sj323707@ohio.edu>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dccp.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 710c04302a15..eaf95a023af4 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -376,8 +376,10 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
376 | /** | 376 | /** |
377 | * struct dccp_request_sock - represent DCCP-specific connection request | 377 | * struct dccp_request_sock - represent DCCP-specific connection request |
378 | * @dreq_inet_rsk: structure inherited from | 378 | * @dreq_inet_rsk: structure inherited from |
379 | * @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1) | 379 | * @dreq_iss: initial sequence number, sent on the first Response (RFC 4340, 7.1) |
380 | * @dreq_isr: initial sequence number received on the Request | 380 | * @dreq_gss: greatest sequence number sent (for retransmitted Responses) |
381 | * @dreq_isr: initial sequence number received in the first Request | ||
382 | * @dreq_gsr: greatest sequence number received (for retransmitted Request(s)) | ||
381 | * @dreq_service: service code present on the Request (there is just one) | 383 | * @dreq_service: service code present on the Request (there is just one) |
382 | * @dreq_featneg: feature negotiation options for this connection | 384 | * @dreq_featneg: feature negotiation options for this connection |
383 | * The following two fields are analogous to the ones in dccp_sock: | 385 | * The following two fields are analogous to the ones in dccp_sock: |
@@ -387,7 +389,9 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
387 | struct dccp_request_sock { | 389 | struct dccp_request_sock { |
388 | struct inet_request_sock dreq_inet_rsk; | 390 | struct inet_request_sock dreq_inet_rsk; |
389 | __u64 dreq_iss; | 391 | __u64 dreq_iss; |
392 | __u64 dreq_gss; | ||
390 | __u64 dreq_isr; | 393 | __u64 dreq_isr; |
394 | __u64 dreq_gsr; | ||
391 | __be32 dreq_service; | 395 | __be32 dreq_service; |
392 | struct list_head dreq_featneg; | 396 | struct list_head dreq_featneg; |
393 | __u32 dreq_timestamp_echo; | 397 | __u32 dreq_timestamp_echo; |