summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 08:43:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 08:43:44 +0000
commitea1f8f1b6b3e7d8ead3758723b9aae08be758f0a (patch)
tree49f764f6134f55cb76b1577c9152deaabd6a58dc
parentAdding upstream version 2.7.0. (diff)
downloaddnsperf-ea1f8f1b6b3e7d8ead3758723b9aae08be758f0a.tar.xz
dnsperf-ea1f8f1b6b3e7d8ead3758723b9aae08be758f0a.zip
Adding upstream version 2.7.1.upstream/2.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGES13
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--src/dns.c7
-rw-r--r--src/test/Makefile.am6
-rw-r--r--src/test/Makefile.in13
-rw-r--r--src/test/datafile626
-rwxr-xr-xsrc/test/test6.sh7
8 files changed, 74 insertions, 20 deletions
diff --git a/CHANGES b/CHANGES
index dc6cbcd..99ef14c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,16 @@
+2021-09-17 Jerry Lundström
+
+ Release 2.7.1
+
+ This release fixes issues with constructing wire-format DNS when the
+ domain names includes escaped characters such as `\123` or `\.`.
+
+ Other changes:
+ - Bump Debian package compat level to 10
+
+ 4873f02 DNS encoding
+ c4eccc0 debhelper
+
2021-08-09 Jerry Lundström
Release 2.7.0
diff --git a/configure b/configure
index 2f1bd71..aef8378 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dnsperf 2.7.0.
+# Generated by GNU Autoconf 2.69 for dnsperf 2.7.1.
#
# Report bugs to <admin@dns-oarc.net>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dnsperf'
PACKAGE_TARNAME='dnsperf'
-PACKAGE_VERSION='2.7.0'
-PACKAGE_STRING='dnsperf 2.7.0'
+PACKAGE_VERSION='2.7.1'
+PACKAGE_STRING='dnsperf 2.7.1'
PACKAGE_BUGREPORT='admin@dns-oarc.net'
PACKAGE_URL='https://github.com/DNS-OARC/dnsperf/issues'
@@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dnsperf 2.7.0 to adapt to many kinds of systems.
+\`configure' configures dnsperf 2.7.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1431,7 +1431,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dnsperf 2.7.0:";;
+ short | recursive ) echo "Configuration of dnsperf 2.7.1:";;
esac
cat <<\_ACEOF
@@ -1570,7 +1570,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dnsperf configure 2.7.0
+dnsperf configure 2.7.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1939,7 +1939,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dnsperf $as_me 2.7.0, which was
+It was created by dnsperf $as_me 2.7.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2802,7 +2802,7 @@ fi
# Define the identity of the package.
PACKAGE='dnsperf'
- VERSION='2.7.0'
+ VERSION='2.7.1'
cat >>confdefs.h <<_ACEOF
@@ -14410,7 +14410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dnsperf $as_me 2.7.0, which was
+This file was extended by dnsperf $as_me 2.7.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14477,7 +14477,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dnsperf config.status 2.7.0
+dnsperf config.status 2.7.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index c8f6029..a4e044b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@
# limitations under the License.
AC_PREREQ(2.64)
-AC_INIT([dnsperf], [2.7.0], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
+AC_INIT([dnsperf], [2.7.1], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_CONFIG_SRCDIR([src/dnsperf.c])
AC_CONFIG_HEADER([src/config.h])
diff --git a/src/dns.c b/src/dns.c
index cf089a8..8c4999f 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -111,12 +111,11 @@ perf_result_t perf_dname_fromstring(const char* str, size_t len, perf_buffer_t*
for (at = 0; at < len; at++) {
if (*(str + at) == '\\') {
at++;
- if (at >= len)
- return PERF_R_FAILURE;
if (*(str + at) >= '0' && *(str + at) <= '9') {
char b[4];
long v;
- memcpy(b, str, 3);
+ memcpy(b, str + at, 3);
+ at += 2;
b[3] = 0;
v = strtol(b, 0, 7);
if (v < 0 || v > 255)
@@ -124,6 +123,8 @@ perf_result_t perf_dname_fromstring(const char* str, size_t len, perf_buffer_t*
perf_buffer_putuint8(target, (uint8_t)v);
continue;
}
+ } else if (*(str + at) == '.') {
+ break;
}
perf_buffer_putmem(target, str + at, 1);
}
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 05439fa..3c5e0d2 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -1,9 +1,9 @@
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
CLEANFILES = test*.log test*.trs \
- test2.out test4.out test4err.out key.pem cert.pem
+ test2.out test4.out test4err.out key.pem cert.pem test6.out
-TESTS = test1.sh test2.sh test3.sh test4.sh test5.sh
+TESTS = test1.sh test2.sh test3.sh test4.sh test5.sh test6.sh
EXTRA_DIST = $(TESTS) \
- datafile datafile2 updatefile datafile3 datafile4 datafile5
+ datafile datafile2 updatefile datafile3 datafile4 datafile5 datafile6
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index fa6167e..78b3759 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -465,11 +465,11 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
CLEANFILES = test*.log test*.trs \
- test2.out test4.out test4err.out key.pem cert.pem
+ test2.out test4.out test4err.out key.pem cert.pem test6.out
-TESTS = test1.sh test2.sh test3.sh test4.sh test5.sh
+TESTS = test1.sh test2.sh test3.sh test4.sh test5.sh test6.sh
EXTRA_DIST = $(TESTS) \
- datafile datafile2 updatefile datafile3 datafile4 datafile5
+ datafile datafile2 updatefile datafile3 datafile4 datafile5 datafile6
all: all-am
@@ -694,6 +694,13 @@ test5.sh.log: test5.sh
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test6.sh.log: test6.sh
+ @p='test6.sh'; \
+ b='test6.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
diff --git a/src/test/datafile6 b/src/test/datafile6
new file mode 100644
index 0000000..8ed7df6
--- /dev/null
+++ b/src/test/datafile6
@@ -0,0 +1,26 @@
+\" A
+\001 A
+\". A
+a\". A
+\"a. A
+a\"a. A
+a\"a\". A
+\!\"a\". A
+\001. A
+a\001. A
+\001a. A
+a\001a. A
+a\001\001\001a. A
+a\001a\001a\001. A
+\".\". A
+a\".a\". A
+\"a.\"a. A
+a\"a.a\"a. A
+a\"a\".a\"a\". A
+\!\"a\".\!\"a\". A
+\001.\001. A
+a\001.a\001. A
+\001a.\001a. A
+a\001a.a\001a. A
+a\001\001\001a.a\001\001\001a. A
+a\001a\001a\001.a\001a\001a\001. A
diff --git a/src/test/test6.sh b/src/test/test6.sh
new file mode 100755
index 0000000..4eea79e
--- /dev/null
+++ b/src/test/test6.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -xe
+
+test "$TEST_DNSPERF_WITH_NETWORK" = "1" || exit 0
+
+../dnsperf -vvv -d "$srcdir/datafile6" -s 1.1.1.1 >test6.out
+
+grep "NXDOMAIN 26" test6.out