summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-07-12 18:40:05 +0000
committerLaurent Bercot <ska@appnovation.com>2023-07-12 18:40:05 +0000
commit7fca0b937293ab5894f94538bf607dda8f58ab2e (patch)
treee3fae60f6b4aef3ce37bfe2f29f0a665192a07f3 /src
parent8ff14e518f01dc9c6ff733d6f9ff284da6546fd6 (diff)
downloads6-dns-7fca0b937293ab5894f94538bf607dda8f58ab2e.tar.xz
smol bugfix
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs6dns/s6dns_hosts_compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_hosts_compile.c b/src/libs6dns/s6dns_hosts_compile.c
index c0bba5b..499bb9d 100644
--- a/src/libs6dns/s6dns_hosts_compile.c
+++ b/src/libs6dns/s6dns_hosts_compile.c
@@ -286,12 +286,12 @@ static int name_write_iter (void *data, void *aux)
hdcm *blah = aux ;
struct iovec kv[3] = { { .iov_base = blah->key, .iov_len = 2 }, { .iov_base = ":", .iov_len = 1 }, { .iov_base = blah->hd->storage.s + node->pos, .iov_len = strlen(blah->hd->storage.s + node->pos) } } ;
struct iovec dv = { .iov_base = node->ipv4.s, .iov_len = node->ipv4.len } ;
- if (node->ipv4.len && !cdbmake_addv(blah->cm, kv, 2, &dv, 1)) return 0 ;
+ if (node->ipv4.len && !cdbmake_addv(blah->cm, kv, 3, &dv, 1)) return 0 ;
if (node->ipv6.len)
{
blah->key[1] = '6' ;
dv.iov_base = node->ipv6.s ; dv.iov_len = node->ipv6.len ;
- if (!cdbmake_addv(blah->cm, kv, 2, &dv, 1)) return 0 ;
+ if (!cdbmake_addv(blah->cm, kv, 3, &dv, 1)) return 0 ;
blah->key[1] = '4' ;
}
return 1 ;