diff options
Diffstat (limited to 'src/libs6dns')
-rw-r--r-- | src/libs6dns/s6dns_engine.c | 4 | ||||
-rw-r--r-- | src/libs6dns/s6dns_init.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 2d07357..10f588c 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -126,7 +126,7 @@ static int thisudp (s6dns_engine_t *dt, tain const *stamp) } if (memcmp(s6dns_ip46list_ip(&dt->servers, dt->curserver), S6DNS_ENGINE_LOCAL0, SKALIBS_IP_SIZE)) break ; } - random_string(dt->sa.s + 2, 2) ; /* random query id */ + random_buf(dt->sa.s + 2, 2) ; /* random query id */ dt->fd = socketudp46(s6dns_ip46list_is6(&dt->servers, dt->curserver)) ; if (dt->fd < 0) return -1 ; if (!randombind(dt->fd, s6dns_ip46list_is6(&dt->servers, dt->curserver))) @@ -153,7 +153,7 @@ static int thistcp (s6dns_engine_t *dt, tain const *stamp) for (; dt->curserver < S6DNS_MAX_SERVERS ; dt->curserver++) if (memcmp(s6dns_ip46list_ip(&dt->servers, dt->curserver), S6DNS_ENGINE_LOCAL0, SKALIBS_IP_SIZE)) break ; if (dt->curserver >= S6DNS_MAX_SERVERS) return -2 ; - random_string(dt->sa.s + 2, 2) ; + random_buf(dt->sa.s + 2, 2) ; dt->fd = sockettcp46(s6dns_ip46list_is6(&dt->servers, dt->curserver)) ; if (dt->fd < 0) return -1 ; if (!randombind(dt->fd, s6dns_ip46list_is6(&dt->servers, dt->curserver))) diff --git a/src/libs6dns/s6dns_init.c b/src/libs6dns/s6dns_init.c index f3cab32..7f98d13 100644 --- a/src/libs6dns/s6dns_init.c +++ b/src/libs6dns/s6dns_init.c @@ -1,12 +1,10 @@ /* ISC license. */ -#include <skalibs/random.h> #include <s6-dns/s6dns-rci.h> #include <s6-dns/s6dns.h> int s6dns_init (void) { - if (!random_init()) return 0 ; if (!s6dns_rci_init(&s6dns_rci_here, "/etc/resolv.conf")) return 0 ; return 1 ; } |