diff options
| author | Andre Oppermann <andre@FreeBSD.org> | 2007-04-04 16:13:45 +0000 |
|---|---|---|
| committer | Andre Oppermann <andre@FreeBSD.org> | 2007-04-04 16:13:45 +0000 |
| commit | 0c38fd0a7affee9b25599728211683687bb9f32a (patch) | |
| tree | a49eb2207cc61bfee9c9ba4fa1ddd2c23488b0ee | |
| parent | 44c900afd79b85fd35a2beafbde065aa4fc735c4 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/tcp_input.c | 12 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 12 | ||||
| -rw-r--r-- | sys/netinet/tcp_syncache.c | 3 |
3 files changed, 7 insertions, 20 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 91bfdda7c760..326241fdf455 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. diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 91bfdda7c760..326241fdf455 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.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. diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index fa32ca286098..2a11710e1b5f 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) |
