From: Jeffrey Altman Date: Fri, 9 Oct 2009 10:23:10 +0000 (-0400) Subject: Windows: Prevent fs fetchdata offset bug error from propagating to caller X-Git-Tag: openafs-devel-1_5_66~84 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8788462b65eca3e4b25f0e5bda44eac43a135d79;p=packages%2Fo%2Fopenafs.git Windows: Prevent fs fetchdata offset bug error from propagating to caller When the file server fetchdata offset bug is triggered and detected, not only do we have to behave as if 'length_found' is zero, but we also must ignore the RXGEN_CC_UNMARSHAL error that will be returned from rx_EndCall() due to the parsing error that occurred during the rx_Read32() call. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/634 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_dcache.c b/src/WINNT/afsd/cm_dcache.c index c3b53d9af..94010d991 100644 --- a/src/WINNT/afsd/cm_dcache.c +++ b/src/WINNT/afsd/cm_dcache.c @@ -1850,8 +1850,11 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp if (code1 == RXKADUNKNOWNKEY) osi_Log0(afsd_logp, "CALL EndCall returns RXKADUNKNOWNKEY"); + /* If we are avoiding a file server bug, ignore the error state */ + if (fs_fetchdata_offset_bug && first_read && length_found == 0 && code == -451) + code = 0; /* Prefer the error value from FetchData over rx_EndCall */ - if (code == 0 && code1 != 0) + else if (code == 0 && code1 != 0) code = code1; osi_Log0(afsd_logp, "CALL FetchData DONE");