diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-07-05 09:13:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2024-07-05 09:13:04 +0000 |
commit | 732bd6a1f4c4e77ba152b213b5ce1f467c1fdef6 (patch) | |
tree | b27a5ae34a18734baba2d3089b891db9602c6dd1 | |
parent | ea9f0d8f2853b512e841ef2d6ca2afa3792616b8 (diff) | |
download | s6-dns-732bd6a1f4c4e77ba152b213b5ce1f467c1fdef6.tar.gz s6-dns-732bd6a1f4c4e77ba152b213b5ce1f467c1fdef6.tar.xz s6-dns-732bd6a1f4c4e77ba152b213b5ce1f467c1fdef6.zip |
Remove s6dns_mininetstring, prepare for 2.7.2.3
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/upgrade.html | 7 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/libs6dns/s6dns_engine.c | 39 |
6 files changed, 19 insertions, 42 deletions
diff --git a/INSTALL b/INSTALL index 2947421..ec6a1aa 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.14.2.0 or later: https://skarnet.org/software/skalibs/ + - skalibs version 2.14.3.0 or later: https://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 4fb87fb..6e5a290 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,12 @@ Changelog for s6-dns. +In 2.3.7.3 +---------- + + - Depend on skalibs-2.14.3.0, remove s6dns_mininetstring_read + - Better debug packet dump in s6-dnsq[r] + + In 2.3.7.2 ---------- diff --git a/doc/index.html b/doc/index.html index 8c42514..0c61a88 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.14.2.0 or later. It's a build-time requirement. It's also a run-time +2.14.3.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.7.2.tar.gz">2.3.7.2</a>. </li> + <li> The current released version of s6-dns is <a href="s6-dns-2.3.7.3.tar.gz">2.3.7.3</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 e82c317..c2c9280 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.7.3 </h2> + +<ul> + <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> +dependency bumped to 2.14.3.0. </li> +</ul> + <h2> in 2.3.7.2 </h2> <ul> diff --git a/package/info b/package/info index fc7ff7b..890a8dd 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-dns -version=2.3.7.2 +version=2.3.7.3 category=web package_macro_name=S6_DNS diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 7f20d73..ed5fd72 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -55,43 +55,6 @@ static int relevant (char const *q, unsigned int qlen, char const *ans, unsigned return 1 ; } -static int s6dns_mininetstring_read (int fd, stralloc *sa, uint32_t *w) -{ - if (!*w) - { - unsigned char pack[2] ; - switch (fd_read(fd, (char *)pack, 2)) - { - case -1 : return -1 ; - case 0 : return 0 ; - case 1 : *w = ((uint32_t)pack[0] << 8) | (1U << 31) ; break ; - case 2 : *w = ((uint32_t)pack[0] << 8) | (uint32_t)pack[1] | (1U << 30) ; break ; - default : return (errno = EDOM, -1) ; - } - } - if (*w & (1U << 31)) - { - unsigned char c ; - switch (fd_read(fd, (char *)&c, 1)) - { - case -1 : return -1 ; - case 0 : return (errno = EPIPE, -1) ; - case 1 : *w |= (uint32_t)c | (1U << 30) ; *w &= ~(1U << 31) ; break ; - default : return (errno = EDOM, -1) ; - } - } - if (*w & (1U << 30)) - { - if (!stralloc_readyplus(sa, *w & ~(1U << 30))) return -1 ; - *w &= ~(1U << 30) ; - } - { - size_t r = allread(fd, sa->s + sa->len, *w) ; - sa->len += r ; *w -= r ; - } - return *w ? -1 : 1 ; -} - /* Network core functions: transport-dependent */ @@ -285,7 +248,7 @@ static int s6dns_engine_read_udp (s6dns_engine_t *dt, tain const *stamp) static int s6dns_engine_read_tcp (s6dns_engine_t *dt, tain const *stamp) { - ssize_t r = sanitize_read(s6dns_mininetstring_read(dt->fd, &dt->sa, &dt->protostate)) ; + ssize_t r = sanitize_read(mininetstring_read(dt->fd, &dt->sa, &dt->protostate)) ; if (r < 0) return (prepare_next(dt, stamp, 1), 0) ; else if (!r) return (errno = EAGAIN, 0) ; else if ((dt->sa.len - dt->querylen) < 12) |