aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-11-13 10:34:38 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:22 -0500
commitd7f7365f5776723da6df73540d855069c2daaa5c (patch)
treecc63c8a85c4d6a768cee8da00577900215e786a8 /net/dccp/ipv4.c
parent865e9022d88ceedd89fa1079a6e1f9266ccd3711 (diff)
[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>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index b56a2fa2694a..bc400b2ba25e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -113,13 +113,8 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
113 /* OK, now commit destination to socket. */ 113 /* OK, now commit destination to socket. */
114 sk_setup_caps(sk, &rt->u.dst); 114 sk_setup_caps(sk, &rt->u.dst);
115 115
116 dp->dccps_gar = 116 dp->dccps_iss = secure_dccp_sequence_number(inet->saddr, inet->daddr,
117 dp->dccps_iss = secure_dccp_sequence_number(inet->saddr, 117 inet->sport, inet->dport);
118 inet->daddr,
119 inet->sport,
120 usin->sin_port);
121 dccp_update_gss(sk, dp->dccps_iss);
122
123 inet->id = dp->dccps_iss ^ jiffies; 118 inet->id = dp->dccps_iss ^ jiffies;
124 119
125 err = dccp_connect(sk); 120 err = dccp_connect(sk);