Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DNS-OARC/dnsperf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.11.0
Choose a base ref
...
head repository: DNS-OARC/dnsperf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Loading
1 change: 0 additions & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ $(top)/rpmbuild:
mkdir -p "$(top)"/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

srpm: prereq update-dist-tools
git config --global safe.directory "*"
test -f .gitmodules && git submodule update --init || true
echo "$(spec)" | grep -q "develop.spec" && auto_build_number=`date --utc +%s` message="Auto build `date --utc --iso-8601=seconds`" "$(top)/dist-tools/spec-new-changelog-entry" || true
overwrite=yes nosign=yes "$(top)/dist-tools/create-source-packages" rpm
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -24,10 +24,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
@@ -45,9 +45,9 @@ jobs:
libnghttp2-dev
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ compile
config.guess
config.sub
configure
configure~
depcomp
install-sh
ltmain.sh
124 changes: 124 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
2024-01-18 Jerry Lundström

Release 2.14.0

This release rewords connection statistics, adds names to threads and
fixes a bug with using TSIG in more than one thread.

In "Connection Statistics", reconnections has been renamed to
connection attempts and now includes both the initial connection
attempt and following reconnections.

If supported, threads will now be named after what they do, such as
"perf-send-<num>" and "perf-recv-<num>".

The TSIG context was shared between all threads and would case a crash
if more than one sending thread was used. This has been fixed and TSIG
contexts are now per thread.

81dc36b TSIG context per thread
55011c6 Thread names
8bdd480 thread names
17c680d Set thread names for dnsperf
54e641d Add library function to set thread names
fb19440 Dockerfile
a80de21 Reword connection statistics
688a4fd Reword connection statistics

2023-08-23 Jerry Lundström

Release 2.13.1

This release fixes a few issues with in-progress queries and the TCP
transport module.

When using stateful connections, such as TCP, if the full query couldn't
be sent in one go then the query and connection could get stuck as
"in-progress".
This could easily happen if you limited the in-flight queries to 1 and
sent very large DNS messages using the stream binary format.
Additional socket ready checks has been added to flush in-progress
queries as quickly as possible.

The TCP module's handling of errors when continuing in-progress queries
has been fixed. Previously it would interpret EAGAIN as an unrecoverable
error and trigger a reconnect, dropping the quer-y/ies in-progress for
that connection.

Other changes:
- Fix input data buffer to allow for maximum binary blob wire format, 2 byte size + max DNS message
- Mention PowerTools repository for building on CentOS etc

56e180c In-progress, bitmaps, clang-format
bbc48db In-progress
059619d In-progress
752575a TCP EAGAIN
d51a453 Max input
76764d7 64k TCP/DoT payload support
8201f50 Doc

2023-06-15 Jerry Lundström

Release 2.13.0

This release adds a new option `-O tls-sni=...` to set the Server Name
Indication when using TLS transport, currently for DNS-over-TLS and
DNS-over-HTTPS.

dbe84f6 TLS SNI
5fb2282 Add TLS Server Name Indication extension support

2023-05-21 Jerry Lundström

Release 2.12.0

This release fixes a segfault when doing DNS-over-HTTPS and changes the
way maximum queries per second are handled.

The DNS-over-HTTPS module handled reconnecting incorrectly and destroyed
the nghttp2 context during callbacks. Thanks to the help from
@kgillis2000 it was quickly found and fixed.

The way maximum QPS is handled has been changed by Petr Špaček @pspacek
(ISC). The new way solves an over-shoot problem that happened due to
max QPS being counted for the whole runtime and based on completed
queries, not just sent.

A new option `qps_threshold_wait` has also been added. This controls
the threshold for using `nanosleep()` between sending packet and the
default is measured on start-up. If the time between packets, based on
max QPS `-Q`, is smaller then no sleep will be performed. This improves
performance when doing high max QPS limiting.

Other changes:
- `dnsperf`: Statistics output
- Fixed missing connection statistics if only reconnections happened
- Flush output to allow pipe/grep processing
- Add percentage on reconnections based on total connections
- Support OpenSSL 3.0+

9aca046 OpenSSL 3.0
6d3d6b4 Stats, DoH
316f901 qps_threshold_wait
ed52770 WIP: use busy wait only if necessary
32229b6 WIP: import nanosleep benchmark
1842b88 Fix dnsperf -Q to not overshot target value

2023-03-16 Jerry Lundström

Release 2.11.2

Fixed long option argument handling (again), wasn't completely fixed
in v2.11.1.

e6dbd78 Long opt

2023-03-10 Jerry Lundström

Release 2.11.1

Fixed long option argument handling that broke in v2.11.0 and enhanced
long option help text, now includes argument type.

034e893 Long opt

2023-02-08 Jerry Lundström

Release 2.11.0
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG BASE_IMAGE=ubuntu:23.10
FROM $BASE_IMAGE AS runtime_base
MAINTAINER Petr Spacek <pspacek@isc.org>
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN apt-get upgrade -y -qqq
# dnsperf's runtime depedencies
RUN apt-get install -y -qqq -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 libck0 libldns3 libnghttp2-14
# separate image for build, will not be tagged at the end
FROM runtime_base AS build_stage
RUN apt-get install -y -qqq -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 autoconf automake build-essential git libck-dev libldns-dev libnghttp2-dev libssl-dev libtool pkg-config # copy repo as build context
COPY . /dnsperf
WORKDIR /dnsperf
RUN ./autogen.sh
RUN ./configure --prefix=/usr/local
RUN make -j$(nproc)
RUN make install
RUN git log -1 > /usr/local/dnsperf.git.log
RUN git diff > /usr/local/dnsperf.git.diff
RUN git status > /usr/local/dnsperf.git.status

# copy only installed artifacts and throw away everything else
FROM runtime_base AS installed
COPY --from=build_stage /usr/local /usr/local

ENTRYPOINT ["/usr/local/bin/dnsperf"]
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 OARC, Inc.
# Copyright 2019-2024 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dnsperf

[![Total alerts](https://img.shields.io/lgtm/alerts/g/DNS-OARC/dnsperf.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DNS-OARC/dnsperf/alerts/) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adnsperf&metric=bugs)](https://sonarcloud.io/dashboard?id=dns-oarc%3Adnsperf) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adnsperf&metric=security_rating)](https://sonarcloud.io/dashboard?id=dns-oarc%3Adnsperf)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adnsperf&metric=bugs)](https://sonarcloud.io/summary/new_code?id=dns-oarc%3Adnsperf) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adnsperf&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=dns-oarc%3Adnsperf)

`dnsperf` and `resperf` are free tools developed by Nominum/Akamai (2006-2018)
and DNS-OARC (since 2019) that make it simple to gather accurate latency and
@@ -53,7 +53,7 @@ To install the dependencies under Debian/Ubuntu:
apt-get install -y libssl-dev libldns-dev libck-dev libnghttp2-dev
```

To install the dependencies under CentOS (with EPEL enabled):
To install the dependencies under CentOS (with EPEL/PowerTools enabled):
```
yum install -y openssl-devel ldns-devel ck-devel libnghttp2-devel
```
@@ -100,7 +100,7 @@ The contrib directory contains additional software related to `dnsperf` and
## License

```
Copyright 2019-2023 OARC, Inc.
Copyright 2019-2024 OARC, Inc.
Copyright 2017-2018 Akamai Technologies
Copyright 2006-2016 Nominum, Inc.
All rights reserved.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh -e
# Copyright 2019-2023 OARC, Inc.
# Copyright 2019-2024 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
10 changes: 8 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 OARC, Inc.
# Copyright 2019-2024 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
@@ -16,12 +16,16 @@
# limitations under the License.

AC_PREREQ(2.64)
AC_INIT([dnsperf], [2.11.0], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
AC_INIT([dnsperf], [2.14.0], [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])
AC_CONFIG_MACRO_DIR([m4])

# for pthread_setname_np
# needs to be called before any macros that run the C compiler
AC_GNU_SOURCE

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
@@ -55,6 +59,8 @@ AM_EXTRA_RECURSIVE_TARGETS([gcov])

# Checks for support.
AX_PTHREAD
AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np])
AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_HEADERS([stdatomic.h])
AM_CONDITIONAL([HAVE_STDATOMIC], [test "x$ac_cv_header_stdatomic_h" != "xno"])
2 changes: 1 addition & 1 deletion contrib/queryparse/queryparse
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright 2019-2023 OARC, Inc.
# Copyright 2019-2024 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
2 changes: 1 addition & 1 deletion contrib/queryparse/queryparse.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Copyright 2019-2023 OARC, Inc.
.\" Copyright 2019-2024 OARC, Inc.
.\" Copyright 2017-2018 Akamai Technologies
.\" Copyright 2006-2016 Nominum, Inc.
.\" All rights reserved.
Loading