viced: initInterfaceAddr_r regardless of ICBS code
authorAndrew Deason <adeason@sinenomine.net>
Fri, 28 Dec 2012 18:16:49 +0000 (13:16 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 2 Jan 2013 20:05:32 +0000 (12:05 -0800)
commitf2f7ba50ed61a6187814d633327a8cacda0f656f
tree520400b6acd8be0c1294df7e14593c31ccf3f79a
parent7b642173c7cd7b6b7130214c1a940501736abbf0
viced: initInterfaceAddr_r regardless of ICBS code

Currently we only call initInterfaceAddr_r for a host if a call to
RXAFS_InitCallBackState3 succeeds. However, this leaves the host
without a host->interface structure, which indicates that the host
does not support UUIDs, and is represented by just a single host,port
pair.

But this is not correct; the host probably does have the relevant UUID
associated with it, but it is just not responding. So, with the
current code, we create a uuid-less host structure for a host that
probably has a uuid; that host structure will probably never be used,
and will just get deleted later.

So instead, always call initInterfaceAdd_r. Do it before the ICBS
call, so the host will be findable via UUID as early as possible. If
the ICBS call fails, the host will be marked as 'down' later on.

Change-Id: I3a000af90773acbdd66fc22718e5e742619839a1
Reviewed-on: http://gerrit.openafs.org/8847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/viced/host.c