summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2007-04-04 16:13:45 +0000
committerandre <andre@FreeBSD.org>2007-04-04 16:13:45 +0000
commit32bf13d188a94af41934893197c8efe4486d9b15 (patch)
treea49eb2207cc61bfee9c9ba4fa1ddd2c23488b0ee /sys/netinet/tcp_input.c
parentf82a2a730c0a76d15214dcad8115de7506581664 (diff)
downloadFreeBSD-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_input.c')
-rw-r--r--sys/netinet/tcp_input.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 91bfdda..326241f 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -854,19 +854,11 @@ findpcb:
* Socket is created in state SYN_RECEIVED.
* Continue processing segment.
*/
- INP_UNLOCK(inp);
+ INP_UNLOCK(inp); /* listen socket */
inp = sotoinpcb(so);
- INP_LOCK(inp);
+ INP_LOCK(inp); /* new connection */
tp = intotcpcb(inp);
/*
- * This is what would have happened in
- * tcp_output() when the SYN,ACK was sent.
- */
- tp->snd_up = tp->snd_una;
- tp->snd_max = tp->snd_nxt = tp->iss + 1;
- tp->last_ack_sent = tp->rcv_nxt;
-
- /*
* Process the segment and the data it
* contains. tcp_do_segment() consumes
* the mbuf chain and unlocks the inpcb.
OpenPOWER on IntegriCloud