libafs: don't crash on no addresses in afs_Conn

we try to avoid a crash on a missing serverHost; do the same
on missing addrs in that host

FIXES 130714

Change-Id: Ic6bab8654cf7bf85351a9482b9ba5d51e5a768d5
Reviewed-on: http://gerrit.openafs.org/7287
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Derrick Brashear 2012-04-26 09:24:25 -04:00
parent 229131ab12
commit 868378cc00

View File

@ -301,6 +301,7 @@ afs_Conn(struct VenusFid *afid, struct vrequest *areq,
/* First is always lowest rank, if it's up */
if ((tv->status[0] == not_busy) && tv->serverHost[0]
&& tv->serverHost[0]->addr
&& !(tv->serverHost[0]->addr->sa_flags & SRVR_ISDOWN) &&
!(((areq->idleError > 0) || (areq->tokenError > 0))
&& (areq->skipserver[0] == 1)))