summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-04-09 15:48:31 +0000
committerLaurent Bercot <ska@appnovation.com>2022-04-09 15:48:31 +0000
commitedb658eb85f0546ee72655f1b5cbacda7853db41 (patch)
tree671d1aa550cd1dac5433ba4b275b3fe1868fb2f3
parent199a1f4b807b7dd3e12b0dd6c1c0a86e6ed2b4b3 (diff)
downloads6-dns-edb658eb85f0546ee72655f1b5cbacda7853db41.tar.xz
Prepare for 2.3.5.4; adapt to skalibs-2.12.0.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--COPYING2
-rw-r--r--INSTALL2
-rw-r--r--NEWS6
-rw-r--r--doc/index.html4
-rw-r--r--doc/upgrade.html7
-rw-r--r--package/info2
-rw-r--r--src/clients/s6-randomip.c7
-rw-r--r--src/libs6dns/s6dns_engine.c4
-rw-r--r--src/libs6dns/s6dns_init.c2
9 files changed, 24 insertions, 12 deletions
diff --git a/COPYING b/COPYING
index 9e95f25..0dfd4b1 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2021 Laurent Bercot <ska-skaware@skarnet.org>
+Copyright (c) 2011-2022 Laurent Bercot <ska-skaware@skarnet.org>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/INSTALL b/INSTALL
index 29be362..97a17fe 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- - skalibs version 2.11.1.0 or later: http://skarnet.org/software/skalibs/
+ - skalibs version 2.12.0.0 or later: http://skarnet.org/software/skalibs/
This software will run on any operating system that implements
POSIX.1-2008, available at:
diff --git a/NEWS b/NEWS
index a0845f7..fe2dd06 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for s6-dns.
+In 2.3.5.4
+----------
+
+ - Adaptation to skalibs-2.12.0.0.
+
+
In 2.3.5.3
----------
diff --git a/doc/index.html b/doc/index.html
index 4fb6bca..51602e7 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -58,7 +58,7 @@ to the s6 ecosystem.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.11.1.0 or later. It's a build-time requirement. It's also a run-time
+2.12.0.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs library. </li>
</ul>
@@ -72,7 +72,7 @@ requirement if you link against the shared version of the skalibs library. </li>
<h3> Download </h3>
<ul>
- <li> The current released version of s6-dns is <a href="s6-dns-2.3.5.3.tar.gz">2.3.5.3</a>. </li>
+ <li> The current released version of s6-dns is <a href="s6-dns-2.3.5.4.tar.gz">2.3.5.4</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6-dns/">s6-dns
git repository</a>:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index f73825b..b5b59e2 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,13 @@
<h1> What has changed in s6-dns </h1>
+<h2> in 2.3.5.4 </h2>
+
+<ul>
+ <li> <a href="//skarnet.org/software/skalibs/">skalibs</a>
+dependency bumped to 2.12.0.0. </li>
+</ul>
+
<h2> in 2.3.5.3 </h2>
<ul>
diff --git a/package/info b/package/info
index ed6342a..34fa97e 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6-dns
-version=2.3.5.3
+version=2.3.5.4
category=web
package_macro_name=S6_DNS
diff --git a/src/clients/s6-randomip.c b/src/clients/s6-randomip.c
index 9419454..3ab98bb 100644
--- a/src/clients/s6-randomip.c
+++ b/src/clients/s6-randomip.c
@@ -2,6 +2,7 @@
#include <sys/types.h>
#include <errno.h>
+
#include <skalibs/types.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
@@ -39,16 +40,16 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (!what) what = 1 ;
what = 1 << (1 << what) ;
- if (!random_init()) strerr_diefu1sys(111, "init random generator") ;
for (i = 0 ; !finite || (i < n) ; i++)
{
size_t len = what ;
if (len > 16)
{
- unsigned char c = random_char() ;
+ char c ;
+ random_buf(&c, 1) ;
len = (c & 1) ? 16 : 4 ;
}
- random_string(ip, len) ;
+ random_buf(ip, len) ;
len = (len == 16) ? ip6_fmt(fmt, ip) : ip4_fmt(fmt, ip) ;
fmt[len++] = '\n' ;
if (buffer_put(buffer_1, fmt, len) < (ssize_t)len)
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 ;
}