Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • knot/knot-resolver
  • dkg/resolver
  • sbalazik/resolver
  • anb/knot-resolver
  • tkrizek/knot-resolver
  • jono/knot-resolver
  • analogic/knot-resolver
  • flokli/knot-resolver
  • hectorm/knot-resolver
  • aisha/knot-resolver
10 results
Show changes
Showing
with 1332 additions and 102 deletions
# SPDX-License-Identifier: GPL-3.0-or-later
[sendrecv]
# in seconds
timeout = 11
# number of queries to run simultaneously
jobs = 64
# in seconds (float); delay each query by a random time (uniformly distributed) between min and max; set max to 0 to disable
time_delay_min = 0
time_delay_max = 0
[servers]
names = kresd, bind, unbound
# symbolic names of DNS servers under test
# separate multiple values by ,
# each symbolic name in [servers] section refers to config section
# containing IP address and port of particular server
[kresd]
ip = 127.0.0.1
port = 5353
transport = udp
graph_color = #00a2e2
restart_script = ./ci/respdiff/restart-kresd.sh
[bind]
ip = 127.0.0.1
port = 53533
transport = udp
graph_color = #e2a000
restart_script = ./ci/respdiff/restart-bind.sh
[unbound]
ip = 127.0.0.1
port = 53535
transport = udp
graph_color = #218669
restart_script = ./ci/respdiff/restart-unbound.sh
[diff]
# symbolic name of server under test
# other servers are used as reference when comparing answers from the target
target = kresd
# fields and comparison methods used when comparing two DNS messages
criteria = opcode, rcode, flags, question, answertypes, answerrrsigs
# other supported criteria values: authority, additional, edns, nsid
[report]
# diffsum reports mismatches in field values in this order
# if particular message has multiple mismatches, it is counted only once into category with highest weight
field_weights = timeout, malformed, opcode, question, rcode, flags, answertypes, answerrrsigs, answer, authority, additional, edns, nsid
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
service named restart
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
exec > /dev/null
exec 2>&1
killall -w kresd
rm -f '*.mdb'
$PREFIX/sbin/kresd -n -q -c $(pwd)/ci/respdiff/kresd.config &>>kresd.log &
# wait until socket is receiving connections
sleep 1
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
service unbound restart
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# $1 == udp/tcp/tls, it selects configuration file to use
# respdiff scripts must be present in /var/opt/respdiff
set -o errexit -o nounset -o xtrace
NDIFFREPRO=3
wget -qO- https://gitlab.nic.cz/knot/respdiff/snippets/238/raw?inline=false | head -n 5000 > /tmp/queries.txt
mkdir results
rm -rf respdiff.db
CONFIG="$(pwd)/ci/respdiff/respdiff-${1}.conf"
/var/opt/respdiff/qprep.py respdiff.db < /tmp/queries.txt
time /var/opt/respdiff/orchestrator.py respdiff.db -c "${CONFIG}"
time /var/opt/respdiff/msgdiff.py respdiff.db -c "${CONFIG}"
for i in $(seq $NDIFFREPRO); do
time /var/opt/respdiff/diffrepro.py -c "${CONFIG}" respdiff.db
done
/var/opt/respdiff/diffsum.py respdiff.db -c "${CONFIG}" > results/respdiff.txt
/var/opt/respdiff/histogram.py respdiff.db -c "${CONFIG}" -o results/histogram.svg
: minimize LMDB and log size so they can be effectively archived
mkdir results/respdiff.db
mdb_copy -c respdiff.db results/respdiff.db
xz -9 results/respdiff.db/data.mdb
xz kresd.log
# SPDX-License-Identifier: GPL-3.0-or-later
#run unbound
service unbound start && service unbound status;
# dig @localhost -p 53535
#run bind
service named start && service named status;
# dig @localhost -p 53533
#run kresd
$PREFIX/sbin/kresd -n -q -c $(pwd)/ci/respdiff/kresd.config &>kresd.log &
# dig @localhost -p 5353
# Project
MAJOR := 15
MINOR := 04
# Paths
PREFIX := /usr/local
BINDIR := /bin
LIBDIR := /lib
INCLUDEDIR = /include
# Tools
ifndef CC
CC := cc
endif
CFLAGS += -std=c99 -D_GNU_SOURCE -Wall -fPIC -I$(abspath .) -DPACKAGE_VERSION="\"$(MAJOR).$(MINOR)\""
RM := rm -f
LN := ln -s
INSTALL := install
PYTHON := python
\ No newline at end of file
AC_PREREQ(2.60)
# Version/identifiers
m4_define([VERSION_MAJOR],[0])
m4_define([VERSION_MINOR],[0])
m4_define([VERSION_MICRO],[2])
AC_INIT(knot-resolver, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), knot-dns@lists.nic.cz, knot-resolver)
AM_INIT_AUTOMAKE([gnits subdir-objects dist-xz -Wall -Werror])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Set compiler compatibility flags
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_CPP_WERROR
# Default compiler flags
CFLAGS="$CFLAGS -Wall -Werror=format-security"
# Checks for programs.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # call AM_PROG_AR only if available
# Linker
LT_INIT
# Use pkg-config
PKG_PROG_PKG_CONFIG
# Platform-specific
AM_CONDITIONAL([HOST_DARWIN], [test "x${host_os}" != "x${host_os/darwin/}"])
# Check for dependencies
AC_CHECK_FUNCS([opendir mkdtemp gettimeofday time])
PKG_CHECK_MODULES([libknot], [libknot])
PKG_CHECK_MODULES([libuv], [libuv], [build_daemon=yes], [build_daemon=no])
PKG_CHECK_MODULES([cmocka], [cmocka], [build_tests=yes], [build_tests=no])
# Check for python (integration tests)
AC_ARG_ENABLE([integration-tests],
AS_HELP_STRING([--enable-integration-tests], [enable integration tests (require Python devel), default: no]),
[build_integration=yes], [build_integration=no])
if test "x${build_integration}" == "xyes"; then
AX_PYTHON_DEVEL([>= '2.5'])
fi
# Set up conditionals
AM_CONDITIONAL([BUILD_TESTS], [test "$build_tests" == "yes"])
AM_CONDITIONAL([BUILD_INTEGRATION], [test "$build_integration" == "yes"])
AM_CONDITIONAL([BUILD_DAEMON], [test "$build_daemon" == "yes"])
# Check for code coverage
AC_ARG_ENABLE([code-coverage],
AS_HELP_STRING([--enable-code-coverage], [enable code coverage, default: no]),
[code_coverage=yes], [code_coverage=no])
if test "x${code_coverage}" == "xyes"; then
CFLAGS="${CFLAGS} --coverage -O0 -g"
fi
# Search other libraries
AC_SEARCH_LIBS([mdb_env_open], [lmdb])
# Config files
AC_CONFIG_FILES([Makefile lib/Makefile tests/Makefile daemon/Makefile])
# Output
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
Target: $host_os $host_cpu
Compiler: ${CC}
CFlags: ${CFLAGS} ${CPPFLAGS} ${libuv_CFLAGS} ${libknot_CFLAGS}
LDFlags: ${LDFLAGS} ${libuv_LIBS} ${libknot_LIBS}
Features:
---------
Build tests: ${build_tests} (integration ${build_integration})
Build daemon: ${build_daemon}
Continue with 'make' command
])
This diff is collapsed.
/* Copyright (C) CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
/*!
* \file
*
* \brief Base32hex implementation (RFC 4648).
*
* \note Input Base32hex string can contain a-v characters. These characters
* are considered as A-V equivalent.
*
* \addtogroup contrib
* @{
*/
#pragma once
#include <stdint.h>
/*!
* \brief Decodes text data using Base32hex.
*
* \note Input data needn't be terminated with '\0'.
*
* \note Input data must be continuous Base32hex string!
*
* \param in Input text data.
* \param in_len Length of input string.
* \param out Output data buffer.
* \param out_len Size of output buffer.
*
* \retval >=0 length of output data.
* \retval KNOT_E* if error.
*/
int32_t base32hex_decode(const uint8_t *in,
const uint32_t in_len,
uint8_t *out,
const uint32_t out_len);
/*!
* \brief Encodes binary data using Base32hex. Lower case is used!
*
* \note Output data buffer contains Base32hex text string which isn't
* terminated with '\0'!
*
* \param in Input binary data.
* \param in_len Length of input data.
* \param out Output data buffer.
* \param out_len Size of output buffer.
*
* \retval >=0 length of output string.
* \retval <0 if error.
*/
int32_t base32hex_encode(const uint8_t *in,
const uint32_t in_len,
uint8_t *out,
const uint32_t out_len);
/*! @} */
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
SPDXID: SPDXRef-DOCUMENT
DocumentName: knotdns-base32hex
DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-4f29f08d-5fbf-4793-934c-9a6a2e6d5517
PackageName: knotdns-base32hex
PackageDownloadLocation: git+https://gitlab.nic.cz/knot/knot-dns.git@2b3c828a4cb8d9595318552483d4947345426c30#src/libknot/internal/base32hex.c
PackageOriginator: Organization: Knot DNS contributors
PackageLicenseDeclared: GPL-3.0-or-later
This diff is collapsed.
This diff is collapsed.
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
SPDXID: SPDXRef-DOCUMENT
DocumentName: knotdns-base64
DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-669dfa8c-3b50-425f-92fc-9b7ce18999f2
PackageName: knotdns-base64
PackageDownloadLocation: git+https://gitlab.nic.cz/knot/knot-dns.git@2b3c828a4cb8d9595318552483d4947345426c30#src/libknot/internal/base64.c
PackageOriginator: Organization: Knot DNS contributors
PackageLicenseDeclared: GPL-3.0-or-later
This diff is collapsed.
This diff is collapsed.
../../licenses/BSD-MIT
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
SPDXID: SPDXRef-DOCUMENT
DocumentName: ccan-asprintf
DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.1-40d4b71d-00e9-4e75-b6da-559203e6b815
PackageName: asprintf
PackageDownloadLocation: git+https://github.com/rustyrussell/ccan@fb1dfd092940905883ea6473162f5f6e36624da2#ccan/asprintf
PackageOriginator: Person: Rusty Russell (rusty@rustcorp.com.au)
PackageLicenseDeclared: MIT