return NSS_STATUS_NOTFOUND;
}
- canonical = "gateway";
+ canonical = "_gateway";
} else {
hn = gethostname_malloc();
c++;
l_canonical = strlen(canonical);
- l_additional = additional ? strlen(additional) : 0;
+ l_additional = strlen_ptr(additional);
ms = ALIGN(l_canonical+1)+
(additional ? ALIGN(l_additional+1) : 0) +
sizeof(char*) +
if (af == AF_UNSPEC)
af = AF_INET;
- if (af != AF_INET && af != AF_INET6) {
+ if (!IN_SET(af, AF_INET, AF_INET6)) {
*errnop = EAFNOSUPPORT;
*h_errnop = NO_DATA;
return NSS_STATUS_UNAVAIL;
return NSS_STATUS_NOTFOUND;
}
- canonical = "gateway";
+ canonical = "_gateway";
} else {
hn = gethostname_malloc();
continue;
if (memcmp(addr, &a->address, FAMILY_ADDRESS_SIZE(af)) == 0) {
- canonical = "gateway";
+ canonical = "_gateway";
goto found;
}
}