From 8788462b65eca3e4b25f0e5bda44eac43a135d79 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 9 Oct 2009 06:23:10 -0400 Subject: [PATCH] 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 --- src/WINNT/afsd/cm_dcache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); -- 2.39.5