diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 1997-02-21 17:05:52 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 1997-02-21 17:05:52 +0000 |
| commit | bdcbab7fb55eb2ff4a2be52f84e8de6ff42b9ed3 (patch) | |
| tree | ba234b240d9728550046c9ad7b5e4c696aee0328 /sys/netinet | |
| parent | d03296652ca765a6e730829bd6b9e2cf2c6b30cb (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 630c44bd0f46..b80c7814f731 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94 - * $Id: tcp_usrreq.c,v 1.15.2.3 1996/01/31 11:02:03 davidg Exp $ + * $Id: tcp_usrreq.c,v 1.15.2.4 1996/09/19 08:18:40 pst Exp $ */ #include <sys/param.h> @@ -350,6 +350,19 @@ tcp_usrreq(so, req, m, nam, control) * Otherwise, snd_up should be one lower. */ sbappend(&so->so_snd, m); + if (nam && tp->t_state < TCPS_SYN_SENT) { + /* + * Do implied connect if not yet connected, + * initialize window to default value, and + * initialize maxseg/maxopd using peer's cached + * MSS. + */ + error = tcp_connect(tp, nam); + if (error) + break; + tp->snd_wnd = TTCP_CLIENT_SND_WND; + tcp_mss(tp, -1); + } tp->snd_up = tp->snd_una + so->so_snd.sb_cc; tp->t_force = 1; error = tcp_output(tp); |
