+2001-12-20 NeilBrown <neilb@cse.unsw.edu.au>
+
+ * support/export/client.c(client_lookup): If a host has multiple
+ IP addresses, then we must always use the result of a
+ gethostbyname, not that of gethostbyaddr for exporting
+
2001-12-20 NeilBrown <neilb@cse.unsw.edu.au>
* support/export/client.c (client_lookup): use strcasecmp when
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;