OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4180-gdc2a4fe

Gerrit Code Review gerrit@openafs.org
Thu, 20 Mar 2014 14:28:46 -0700 (PDT)


The following commit has been merged in the master branch:
commit dc2a4fe4e949c250ca25708aa5a6dd575878fd7e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date:   Sat Dec 14 19:38:50 2013 -0500

    vos: GetServer search for non-loopback address
    
    GetServer() is used to obtain an IP address for the 'aname' parameter.
    'aname' can be either a dotted address or a host name.   If it is a dotted
    address, it is returned immediately.  If it is a host name, then
    gethostbyname() is used to obtain an IP address.
    
    The prior version of this function had two failings:
    
    1. It assumed that a struct hostent only contained a single address.
       It used the former h_addr field.  For all platforms supported by
       OpenAFS h_addr is a macro referencing the first address in the
       h_addr_list array.  If h_addr was a loopback address, it would
       ignore any additional addresses that might be in the list.
    
    2. It assumed that if gethostbyname(aname) returned a loopback
       address as h_addr that 'aname' must be referring to the machine
       that the vos command is being executed on.  It therefore used
       gethostname() to obtain an alternate name to use for a gethostbyname()
       query.  The results of this query were not checked to be a loopback.
       As a result, a loopback address could be returned to the caller which
       in turn could be set into the VLDB.
    
    Change-Id: Ib8d513be9daf650045e9c40718b0187f6b9770a2
    Reviewed-on: http://gerrit.openafs.org/10585
    Reviewed-by: D Brashear <shadow@your-file-system.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: Harald Barth <haba+gerrit@kth.se>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/volser/vos.c |   51 ++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 38 insertions(+), 13 deletions(-)

-- 
OpenAFS Master Repository