1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* nss/nss_files/files-ethers.c (ntohost): Fix db key.

This commit is contained in:
Roland McGrath
1996-07-02 19:42:29 +00:00
parent 96bda0ea44
commit 54955962d2
3 changed files with 7 additions and 2 deletions

View File

@@ -64,8 +64,10 @@ DB_LOOKUP (hostton, 1 + strlen (name), (".%s", name),
break;
}, const char *name)
DB_LOOKUP (ntohost, 7, ("=%c%c%c%c%c%c",
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]),
DB_LOOKUP (ntohost, 18, ("=%x:%x:%x:%x:%x:%x",
addr->ether_addr_octet[0], addr->ether_addr_octet[1],
addr->ether_addr_octet[2], addr->ether_addr_octet[3],
addr->ether_addr_octet[4], addr->ether_addr_octet[5]),
{
if (memcmp (&result->e_addr, addr,
sizeof (struct ether_addr)) == 0)