diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-11-17 20:23:56 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2023-11-17 20:23:56 +0000 |
| commit | d06529686f89074fd4fa574ac6012f8a873e7857 (patch) | |
| tree | e2fd4e499d8a633feeff288a9d42e904abca8903 /src/libs6dns/s6dns_init.c | |
| parent | 9d432bd8a07dd36247339c40fa6bf2719600fdb2 (diff) | |
| download | s6-dns-d06529686f89074fd4fa574ac6012f8a873e7857.tar.gz | |
Prepare for 2.3.7.0; ignore link-local addresses in /etc/hosts
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6dns/s6dns_init.c')
| -rw-r--r-- | src/libs6dns/s6dns_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_init.c b/src/libs6dns/s6dns_init.c index 10dcbf5..5c8a25c 100644 --- a/src/libs6dns/s6dns_init.c +++ b/src/libs6dns/s6dns_init.c @@ -4,10 +4,10 @@ #include <s6-dns/hosts.h> #include <s6-dns/s6dns.h> -int s6dns_init (void) +int s6dns_init_options (uint32_t options) { if (!s6dns_rci_init(&s6dns_rci_here, "/etc/resolv.conf")) return 0 ; - if (s6dns_hosts_init(&s6dns_hosts_here, "/etc/hosts", "/etc/hosts.cdb", "/tmp/hosts.cdb") == -1) goto err ; + if (options & 1 && s6dns_hosts_init(&s6dns_hosts_here, "/etc/hosts", "/etc/hosts.cdb", "/tmp/hosts.cdb") == -1) goto err ; return 1 ; err: |
