From f64cfb2378dc3a60cd30c50180a366ec54b98781 Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 15 Jul 2015 22:59:45 +0000 Subject: [PATCH] Libinfo-459.40.1.tar.gz --- lookup.subproj/mdns_module.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lookup.subproj/mdns_module.c b/lookup.subproj/mdns_module.c index 9784693..09f99fc 100644 --- a/lookup.subproj/mdns_module.c +++ b/lookup.subproj/mdns_module.c @@ -558,7 +558,16 @@ mdns_hostbyaddr(si_mod_t *si, const void *addr, int af, const char *interface, u } bb = reply.ttl + time(NULL); - out = (si_item_t *)LI_ils_create("L4488s*44a", (unsigned long)si, cat, 1, bb, 0LL, h.host.h_name, h.host.h_aliases, h.host.h_addrtype, h.host.h_length, h.host.h_addr_list); + + switch (af) + { + case AF_INET: + out = (si_item_t *)LI_ils_create("L4488s*44a", (unsigned long)si, CATEGORY_HOST_IPV4, 1, bb, 0LL, h.host.h_name, h.host.h_aliases, h.host.h_addrtype, h.host.h_length, h.host.h_addr_list); + break; + case AF_INET6: + out = (si_item_t *)LI_ils_create("L4488s*44c", (unsigned long)si, CATEGORY_HOST_IPV6, 1, bb, 0LL, h.host.h_name, h.host.h_aliases, h.host.h_addrtype, h.host.h_length, h.host.h_addr_list); + break; + } _mdns_hostent_clear(&h); -- 2.45.2