X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Frmtab.c;h=31c0f50419193e7426c7ccf7bb7eb67045a213a8;hp=0ec495c43c80e972d5cededb4946ab74c1718889;hb=0509d3428f523776ddd9d6e9fa318587d3ec7d84;hpb=3ca5879be32c4c11750e12230ff588195fff0738 diff --git a/support/export/rmtab.c b/support/export/rmtab.c index 0ec495c..31c0f50 100644 --- a/support/export/rmtab.c +++ b/support/export/rmtab.c @@ -28,17 +28,14 @@ static void rmtab_read_wildcard(struct rmtabent *rep) { nfs_export *exp, *exp2; - struct hostent *hp; + struct addrinfo *ai; - hp = gethostbyname(rep->r_client); - if (hp == NULL) - return; - hp = hostent_dup(hp); - if (hp == NULL) + ai = host_addrinfo(rep->r_client); + if (ai == NULL) return; - exp = export_allowed(hp, rep->r_path); - free(hp); + exp = export_allowed(ai, rep->r_path); + freeaddrinfo(ai); if (exp == NULL) return;