diff options
author | neilbrown <neilbrown> | 2001-12-20 03:09:14 +0000 |
---|---|---|
committer | neilbrown <neilbrown> | 2001-12-20 03:09:14 +0000 |
commit | c69020c28de49ab71da0389199c45d104f170656 (patch) | |
tree | b6ae6b72272024c7688c6aecbba0939dba30844e /support/export/client.c | |
parent | 0bd51f4c931eb68c355140c721763be64213a3ca (diff) | |
download | nfs-utils-c69020c28de49ab71da0389199c45d104f170656.tar.gz nfs-utils-c69020c28de49ab71da0389199c45d104f170656.tar.xz nfs-utils-c69020c28de49ab71da0389199c45d104f170656.zip |
see changelog
Diffstat (limited to 'support/export/client.c')
-rw-r--r-- | support/export/client.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/support/export/client.c b/support/export/client.c index 03f7917..6d5d306 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -57,8 +57,17 @@ client_lookup(char *hname, int canonical) hp = gethostbyaddr(hp2->h_addr, hp2->h_length, hp2->h_addrtype); if (hp) { - free(hp2); hp = hostent_dup(hp); + /* but now we might not have all addresses... */ + if (hp2->h_addr_list[1]) { + struct hostent *hp3 = + gethostbyname(hp->h_name); + if (hp3) { + free(hp); + hp = hostent_dup(hp3); + } + } + free(hp2); } else hp = hp2; |