From: Jeffrey Altman Date: Fri, 15 Jan 2010 14:06:05 +0000 (-0500) Subject: Rx: Correct AFS_NT40_ENV rx_GetIFInfo max MTU assignments X-Git-Tag: openafs-devel-1_5_69~13 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=df702210275453e0d2362b0e142d82bfaf14406c;p=packages%2Fo%2Fopenafs.git Rx: Correct AFS_NT40_ENV rx_GetIFInfo max MTU assignments 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 Tested-by: Jeffrey Altman --- diff --git a/src/rx/rx_user.c b/src/rx/rx_user.c index 167b9c7ee..eb62ed791 100644 --- a/src/rx/rx_user.c +++ b/src/rx/rx_user.c @@ -402,12 +402,14 @@ rx_GetIFInfo(void) 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;