]> git.decadent.org.uk Git - nfs-utils.git/commit
mountd: Replace "struct hostent" with "struct addrinfo"
authorChuck Lever <chuck.lever@oracle.com>
Tue, 22 Jun 2010 16:43:01 +0000 (12:43 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 22 Jun 2010 20:04:53 +0000 (16:04 -0400)
commit0509d3428f523776ddd9d6e9fa318587d3ec7d84
treef8f3cb4d1af6f60bc178800790b666a63c323b61
parent3ca5879be32c4c11750e12230ff588195fff0738
mountd: Replace "struct hostent" with "struct addrinfo"

struct hostent can store either IPv4 or IPv6 addresses, but it can't
store both address families concurrently for the same host.  Neither
can hostent deal with parts of socket addresses that are outside of
the sin{,6}_addr field.

Replace the use of "struct hostent" everywhere in libexport.a, mountd,
and exportfs with "struct addrinfo".  This is a large change, but
there are so many strong dependencies on struct hostent that this
can't easily be broken into smaller pieces.

One benefit of this change is that hostent_dup() is no longer
required, since the results of getaddrinfo(3) are already dynamically
allocated.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/export/client.c
support/export/export.c
support/export/rmtab.c
support/include/exportfs.h
utils/exportfs/exportfs.c
utils/mountd/auth.c
utils/mountd/cache.c
utils/mountd/mountd.c