882 |
|
inp->inp_laddr = laddr; |
883 |
|
in_pcbrehash(inp); |
884 |
|
|
885 |
< |
/* Compute window scaling to request. */ |
885 |
> |
/* |
886 |
> |
* Compute window scaling to request: |
887 |
> |
* Scale to fit into sweet spot. See tcp_syncache.c. |
888 |
> |
* XXX: This should be moved to tcp_output(). |
889 |
> |
*/ |
890 |
|
while (tp->request_r_scale < TCP_MAX_WINSHIFT && |
891 |
< |
(TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) |
891 |
> |
(0x1 << tp->request_r_scale) < tcp_minmss) /* XXX */ |
892 |
|
tp->request_r_scale++; |
893 |
|
|
894 |
|
soisconnecting(so); |
1195 |
|
if (error) |
1196 |
|
return (error); |
1197 |
|
} |
1198 |
+ |
so->so_rcv.sb_flags |= SB_AUTOSIZE; |
1199 |
+ |
so->so_snd.sb_flags |= SB_AUTOSIZE; |
1200 |
|
error = in_pcballoc(so, &tcbinfo, "tcpinp"); |
1201 |
|
if (error) |
1202 |
|
return (error); |