diff options
author | andre <andre@FreeBSD.org> | 2007-04-04 16:13:45 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-04-04 16:13:45 +0000 |
commit | 32bf13d188a94af41934893197c8efe4486d9b15 (patch) | |
tree | a49eb2207cc61bfee9c9ba4fa1ddd2c23488b0ee /sys/netinet/tcp_syncache.c | |
parent | f82a2a730c0a76d15214dcad8115de7506581664 (diff) | |
download | FreeBSD-src-32bf13d188a94af41934893197c8efe4486d9b15.zip FreeBSD-src-32bf13d188a94af41934893197c8efe4486d9b15.tar.gz |
Move last tcpcb initialization for the inbound connection case from
tcp_input() to syncache_socket() where it belongs and the majority
of it already happens.
The "tp->snd_up = tp->snd_una" is removed as it is done with the
tcp_sendseqinit() macro a few lines earlier.
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index fa32ca2..2a11710 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -687,9 +687,12 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tcp_rcvseqinit(tp); tcp_sendseqinit(tp); tp->snd_wl1 = sc->sc_irs; + tp->snd_max = tp->iss + 1; + tp->snd_nxt = tp->iss + 1; tp->rcv_up = sc->sc_irs + 1; tp->rcv_wnd = sc->sc_wnd; tp->rcv_adv += tp->rcv_wnd; + tp->last_ack_sent = tp->rcv_nxt; tp->t_flags = sototcpcb(lso)->t_flags & (TF_NOPUSH|TF_NODELAY); if (sc->sc_flags & SCF_NOOPT) |