cxgbe/t4_tom: Any invalid scaling factor in the hardware's wsf field

implies that window scaling is not in use.

MFC after:	3 days
Sponsored by:	Chelsio Communications
This commit is contained in:
np 2019-08-23 22:41:16 +00:00
parent bcf48adfe8
commit a3a86707e0

View File

@ -994,7 +994,7 @@ t4opt_to_tcpopt(const struct tcp_options *t4opt, struct tcpopt *to)
to->to_mss = be16toh(t4opt->mss);
}
if (t4opt->wsf) {
if (t4opt->wsf > 0 && t4opt->wsf < 15) {
to->to_flags |= TOF_SCALE;
to->to_wscale = t4opt->wsf;
}