On UNIX, the rx library values for rx_maxReceiveSize and
rx_MyMaxSendSize are sent by the cache manager directly.
In Windows, they are set by rx_GetIFInfo() which had two
errors.
(1) The comparison of rx_maxReceiveSize and maxsize were
reversed which prevented rx_maxReceiveSize from ever
being set to the interface MTU.
(2) rx_MyMaxSendSize was never assigned a value.
As a result, two problems occurred.
(1) The remote peer was never told about the local MTU.
(2) The local peer ignores the MTU.
From 1.3.60 to 1.5.33, OpenAFS for Windows installers
provided a registry default RxMaxMTU of 1260. This caused
the cache manager to call rx_SetMaxMTU() which in turn set
both rx_maxReceiveSize and rx_MyMaxSendSize in effect
masking these errors.
Change-Id: Ib05927d7985052e233ff6f4bd170a939eb05c320
Reviewed-on: http://gerrit.openafs.org/1107
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
maxsize =
rxi_nRecvFrags * rxsize + (rxi_nRecvFrags - 1) * UDP_HDR_SIZE;
maxsize = rxi_AdjustMaxMTU(rxsize, maxsize);
- if (rx_maxReceiveSize < maxsize) {
+ if (rx_maxReceiveSize > maxsize) {
rx_maxReceiveSize = MIN(RX_MAX_PACKET_SIZE, maxsize);
rx_maxReceiveSize =
MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
}
-
+ if (rx_MyMaxSendSize > maxsize) {
+ rx_MyMaxSendSize = MIN(RX_MAX_PACKET_SIZE, maxsize);
+ }
}
UNLOCK_IF;