diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-13 12:51:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-13 12:51:09 +0000 |
commit | 85ed638be3aea9c8ab6806a1fde248b10c2fee14 (patch) | |
tree | 247567f39cfc461307efa81d482a4a7ea05af098 /src/libs6dns/s6dns_hosts_name.c | |
parent | 7fca0b937293ab5894f94538bf607dda8f58ab2e (diff) | |
download | s6-dns-85ed638be3aea9c8ab6806a1fde248b10c2fee14.tar.xz |
Bugfix the bigfuxes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6dns/s6dns_hosts_name.c')
-rw-r--r-- | src/libs6dns/s6dns_hosts_name.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs6dns/s6dns_hosts_name.c b/src/libs6dns/s6dns_hosts_name.c index af2030b..53d5431 100644 --- a/src/libs6dns/s6dns_hosts_name.c +++ b/src/libs6dns/s6dns_hosts_name.c @@ -6,6 +6,7 @@ #include <skalibs/cdb.h> #include <skalibs/stralloc.h> #include <skalibs/genalloc.h> +#include <skalibs/skamisc.h> #include <s6-dns/hosts.h> @@ -24,7 +25,7 @@ int s6dns_hosts_name_r (cdb const *c, char const *ip, stralloc *sa, genalloc *ga if (!c->map) return 0 ; if (is6) tmp[1] = '6' ; memcpy(tmp + 3, ip, is6 ? 16 : 4) ; - r = cdb_find(c, &data, tmp, 7) ; + r = cdb_find(c, &data, tmp, is6 ? 19 : 7) ; if (r <= 0) return r ; if (!data.len) return 0 ; if (data.s[data.len - 1]) return (errno = EPROTO, -1) ; |