summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2001-08-22 00:58:16 +0000
committersilby <silby@FreeBSD.org>2001-08-22 00:58:16 +0000
commit58e247fcc429356ba8d8fe81cb9750c74a98d9bc (patch)
tree3b00e220029de2166baf4b0e693035bb7d8a5842 /sys/netinet/tcp_input.c
parentb6d83b57c8b4c0005bbfe32530e296298e941273 (diff)
downloadFreeBSD-src-58e247fcc429356ba8d8fe81cb9750c74a98d9bc.zip
FreeBSD-src-58e247fcc429356ba8d8fe81cb9750c74a98d9bc.tar.gz
Much delayed but now present: RFC 1948 style sequence numbers
In order to ensure security and functionality, RFC 1948 style initial sequence number generation has been implemented. Barring any major crypographic breakthroughs, this algorithm should be unbreakable. In addition, the problems with TIME_WAIT recycling which affect our currently used algorithm are not present. Reviewed by: jesper
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 37b6492..a49c07d 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -101,7 +101,6 @@ struct tcphdr tcp_savetcp;
MALLOC_DEFINE(M_TSEGQ, "tseg_qent", "TCP segment queue entry");
static int tcprexmtthresh = 3;
-tcp_seq tcp_iss;
tcp_cc tcp_ccgen;
struct tcpstat tcpstat;
@@ -1135,7 +1134,7 @@ findpcb:
if (iss)
tp->iss = iss;
else {
- tp->iss = tcp_new_isn();
+ tp->iss = tcp_new_isn(tp);
}
tp->irs = th->th_seq;
tcp_sendseqinit(tp);
@@ -1667,7 +1666,7 @@ trimthenstep6:
if (thflags & TH_SYN &&
tp->t_state == TCPS_TIME_WAIT &&
SEQ_GT(th->th_seq, tp->rcv_nxt)) {
- iss = tcp_new_isn();
+ iss = tcp_new_isn(tp);
tp = tcp_close(tp);
goto findpcb;
}
OpenPOWER on IntegriCloud