From: Simon Wilkinson Date: Thu, 19 May 2011 17:19:29 +0000 (+0100) Subject: vlserver: Use correct base value when replacing X-Git-Tag: upstream/1.6.6_pre2^2~116 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d43bdbb42a7f7a5663f0944c4e672ca81aa7b940;p=packages%2Fo%2Fopenafs.git vlserver: Use correct base value when replacing When we're removing existing address entries the code calculates a base and index value for each entry that we're removing an address from. However, it then _uses_ a previously calculated base value, with the new index. This works fine if the old base and the new base match, but if they don't, chaos will ensue. Fix to always use matched base and index pairs. Reviewed-on: http://gerrit.openafs.org/4771 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a180b0c5d8991a14f1fbd78d81dcb4754a24f4d3) Change-Id: I37372f020ad644f30b6dbdd1ed68b56eb1c0f2e2 Reviewed-on: http://gerrit.openafs.org/9429 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index bfc48bc6f..22d0687db 100644 --- a/src/vlserver/vlprocs.c +++ b/src/vlserver/vlprocs.c @@ -2355,7 +2355,7 @@ SVL_RegisterAddrs(struct rx_call *rxcall, afsUUID *uuidp, afs_int32 spare1, base = (ctx.hostaddress[WillChange[i]] >> 16) & 0xff; index = ctx.hostaddress[WillChange[i]] & 0x0000ffff; - tex = &ctx.ex_addr[fbase][index]; + tex = &ctx.ex_addr[base][index]; if (++m == 1) VLog(0,