[DCCPv6]: Choose a genuine initial sequence number
This * resolves a FIXME - DCCPv6 connections started all with an initial sequence number of 1; * provides a redirection `secure_dccpv6_sequence_number' in case the init_sequence_v6 code should be updated later; * concentrates the update of S.GAR into dccp_connect_init(); * removes a duplicate dccp_update_gss() in ipv4.c; * uses inet->dport instead of usin->sin_port, due to the following assignment in dccp_v4_connect(): inet->dport = usin->sin_port; Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
committed by
David S. Miller
parent
865e9022d8
commit
d7f7365f57
@ -448,7 +448,6 @@ static inline void dccp_connect_init(struct sock *sk)
|
||||
|
||||
dccp_sync_mss(sk, dst_mtu(dst));
|
||||
|
||||
dccp_update_gss(sk, dp->dccps_iss);
|
||||
/*
|
||||
* SWL and AWL are initially adjusted so that they are not less than
|
||||
* the initial Sequence Numbers received and sent, respectively:
|
||||
@ -457,8 +456,13 @@ static inline void dccp_connect_init(struct sock *sk)
|
||||
* These adjustments MUST be applied only at the beginning of the
|
||||
* connection.
|
||||
*/
|
||||
dccp_update_gss(sk, dp->dccps_iss);
|
||||
dccp_set_seqno(&dp->dccps_awl, max48(dp->dccps_awl, dp->dccps_iss));
|
||||
|
||||
/* S.GAR - greatest valid acknowledgement number received on a non-Sync;
|
||||
* initialized to S.ISS (sec. 8.5) */
|
||||
dp->dccps_gar = dp->dccps_iss;
|
||||
|
||||
icsk->icsk_retransmits = 0;
|
||||
init_timer(&dp->dccps_xmit_timer);
|
||||
dp->dccps_xmit_timer.data = (unsigned long)sk;
|
||||
|
Reference in New Issue
Block a user