OpenAFS Master Repository branch, master, updated. BP--openafs-stable-1_6_x-709-gc15468e
Gerrit Code Review
gerrit@openafs.org
Tue, 1 Feb 2011 06:18:39 -0800 (PST)
The following commit has been merged in the master branch:
commit efe4a20c46c73c39bd979437956beddcd3057bc3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jan 31 11:43:39 2011 -0500
Windows: No NCBRESET when probing Loopback after start
The Netbios NCBRESET command resets all of the Netbios state
associated with the LAN adapter including the name bindings.
In response to a detected LAN adapter IP address change, the
smb_LanAdapterChange() function is called to determine if any
Netbios LAN adapter bindings that were in use or should be in
use by afsd_service were altered. As part of the check,
lana_GetUncServerNameEx() is called which in turn calls
lana_FindLoopback() which in turn issued a lana_IsLoopback()
for each LAN adapter with the 'reset adapter' flag set to TRUE.
Calling lana_IsLoopback() with 'reset' equal TRUE was fine
when lana_GetUncServerNameEx() was only called from smb_Init(),
but it is not fine when called after the service is processing
calls. By resetting the adapter the binding of the netbios name
"AFS" (or "<MACHINE>-AFS") is removed and all outstanding calls
are canceled. If the SMB redirector attempts a reconnect during
the window before NCBADDNAM is called to re-bind the name, a
negative cache entry will be placed in the netbios name lookup
table that will prevent the SMB redirector from connecting to
the client for several minutes.
If the environment is one in which frequent IP address change
events are triggered, it is possible that the SMB redirector
will never be able to reconnect to the service.
This patchset adds a flag, LANA_NETBIOS_NO_RESET, to the
lana_GetUncServerEx interface which permits smb_LanAdapterChange()
to avoid the undesirable reset. This negative flag was selected
in order to avoid changing the current default behavior as the
lanahelper library is used by out of tree installers and it
is preferred that OpenAFS avoid breaking them unnecessarily.
Change-Id: I094af7b342d27c65025235888705af8af1a7d56e
Reviewed-on: http://gerrit.openafs.org/3821
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/afsd/lanahelper.cpp | 11 ++++++-----
src/WINNT/afsd/lanahelper.h | 4 +++-
src/WINNT/afsd/smb.c | 7 +++++--
3 files changed, 14 insertions(+), 8 deletions(-)
--
OpenAFS Master Repository