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
No results found
Show changes
Commits on Source (18)
......@@ -27,6 +27,17 @@ stages:
- deploy
- pkgtest
# https://docs.gitlab.com/ce/ci/jobs/job_control.html#select-different-runner-tags-for-each-parallel-matrix-job
.multi_platform: &multi_platform
parallel:
matrix:
- PLATFORM: [ amd64, arm64 ]
tags: # some will override this part
- ${PLATFORM}
- docker
- linux
.common: &common
except:
refs:
......@@ -117,9 +128,10 @@ docker:
<<: *nodep
stage: build
image: docker:latest
<<: *multi_platform
tags:
- ${PLATFORM}
- dind
- amd64
variables:
DOCKER_IMAGE_NAME: knot-resolver-test:${CI_COMMIT_SHA}
script:
......
......@@ -5,6 +5,7 @@ Improvements
------------
- daemon/tls: disable TLS resumption via tickets for TLS <= 1.2 (#742, !1295)
- daemon/http: DoH now responds with proper HTTP codes (#728, !1279)
- renumber module: allow rewriting subnet to a single IP (!1302)
Bugfixes
--------
......
......@@ -143,12 +143,14 @@ ubuntu-21.10:pkgbuild:
nixos-unstable:pkgbuild:
<<: *pkgbuild
# We do NOT use LXC, for now at least.
parallel:
matrix:
- PLATFORM: [ amd64, arm64 ]
tags:
- docker
- linux
- amd64
# TODO: untag after resolving problems around https://github.com/NixOS/nix/issues/5776
image: nixos/nix:2.3.12
- ${PLATFORM}
image: nixos/nix
variables:
#NIX_PATH: nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz
......
......@@ -4,8 +4,6 @@
#include "daemon/bindings/impl.h"
#include "daemon/zimport.h"
/** @internal return cache, or throw lua error if not open */
static struct kr_cache * cache_assert_open(lua_State *L)
{
......
......@@ -87,7 +87,7 @@ if get_option('kres_gen_test') and not meson.is_cross_build()
'''.format(ttc.get('tname'), tsize)
endforeach
# Now feed it directly into luajit.
kres_gen_test = run_command(find_program('luajit'), '-e', kres_gen_test_luastr)
kres_gen_test = run_command(find_program('luajit'), '-e', kres_gen_test_luastr, check: false)
if kres_gen_test.returncode() != 0
error('if you use released Knot* versions, please contact us: https://www.knot-resolver.cz/contact/\n'
+ kres_gen_test.stderr().strip())
......
......@@ -4,19 +4,14 @@
#include "kresconfig.h"
#include "contrib/ccan/asprintf/asprintf.h"
#include "contrib/cleanup.h"
#include "contrib/ucw/mempool.h"
#include "daemon/engine.h"
#include "daemon/io.h"
#include "daemon/network.h"
#include "daemon/tls.h"
#include "daemon/udp_queue.h"
#include "daemon/worker.h"
#include "lib/defines.h"
#include "lib/dnssec.h"
#include "lib/dnssec/ta.h"
#include "lib/resolve.h"
#include "lib/log.h"
#include <arpa/inet.h>
......
......@@ -6,7 +6,6 @@
#include "lib/defines.h"
#include "daemon/session.h"
#include "daemon/engine.h"
#include "daemon/tls.h"
#include "daemon/http.h"
#include "daemon/worker.h"
......
......@@ -19,7 +19,6 @@
#include "contrib/ucw/lib.h"
#include "contrib/base64.h"
#include "daemon/io.h"
#include "daemon/tls.h"
#include "daemon/worker.h"
#include "daemon/session.h"
......
......@@ -12,7 +12,7 @@
#include <gnutls/x509.h>
#include <gnutls/crypto.h>
#include "daemon/worker.h"
#include "daemon/engine.h"
#include "daemon/tls.h"
#define EPHEMERAL_PRIVKEY_FILENAME "ephemeral_key.pem"
......
......@@ -5,7 +5,6 @@
#include "kresconfig.h"
#include "daemon/udp_queue.h"
#include "daemon/session.h"
#include "daemon/worker.h"
#include "lib/generic/array.h"
#include "lib/utils.h"
......
......@@ -32,7 +32,6 @@
#include "daemon/tls.h"
#include "daemon/http.h"
#include "daemon/udp_queue.h"
#include "daemon/zimport.h"
#include "lib/layer.h"
#include "lib/utils.h"
......@@ -724,7 +723,7 @@ static int qr_task_send(struct qr_task *task, struct session *session,
if (kr_fails_assert(handle && handle->data == session))
return qr_task_on_send(task, NULL, kr_error(EINVAL));
const bool is_stream = handle->type == UV_TCP;
if (!is_stream && handle->type != UV_UDP) abort();
kr_require(is_stream || handle->type == UV_UDP);
if (addr == NULL)
addr = session_get_peer(session);
......
......@@ -29,7 +29,6 @@
#include <sys/stat.h>
#include <uv.h>
#include "contrib/ucw/mempool.h"
#include <libknot/rrset.h>
#include <libzscanner/scanner.h>
......@@ -47,7 +46,6 @@
#include "daemon/worker.h"
#include "lib/dnssec/ta.h"
#include "lib/dnssec.h"
#include "lib/generic/array.h"
#include "lib/generic/trie.h"
#include "lib/utils.h"
......
......@@ -4,7 +4,7 @@
# man page
man_config = configuration_data()
man_config.set('version', meson.project_version())
man_config.set('date', run_command('../scripts/get-date.sh').stdout())
man_config.set('date', run_command('../scripts/get-date.sh', check: true).stdout())
man_config.set('man_seealso_systemd', '')
if systemd_files == 'enabled'
......@@ -30,20 +30,20 @@ if get_option('doc') == 'enabled'
makeinfo = find_program('makeinfo', required: false)
# python dependencies: breathe, sphinx_rtd_theme
python_breathe = run_command('python3', '-c', 'import breathe')
python_breathe = run_command('python3', '-c', 'import breathe', check: false)
if python_breathe.returncode() != 0
# some distros might use python2 sphinx
python_breathe = run_command('python2', '-c', 'import breathe')
python_breathe = run_command('python2', '-c', 'import breathe', check: false)
if python_breathe.returncode() != 0
error('missing doc dependency: python breathe')
else
python_sphinx_rtd_theme = run_command('python2', '-c', 'import sphinx_rtd_theme')
python_sphinx_rtd_theme = run_command('python2', '-c', 'import sphinx_rtd_theme', check: false)
if python_sphinx_rtd_theme.returncode() != 0
error('missing doc dependency: python sphinx_rtd_theme')
endif
endif
else
python_sphinx_rtd_theme = run_command('python3', '-c', 'import sphinx_rtd_theme')
python_sphinx_rtd_theme = run_command('python3', '-c', 'import sphinx_rtd_theme', check: false)
if python_sphinx_rtd_theme.returncode() != 0
error('missing doc dependency: python sphinx_rtd_theme')
endif
......
......@@ -21,7 +21,7 @@ install_data(
# kresd.conf
install_kresd_conf = get_option('install_kresd_conf') == 'enabled'
if get_option('install_kresd_conf') == 'auto'
if run_command(['test', '-r', etc_dir / 'kresd.conf']).returncode() == 1
if run_command(['test', '-r', etc_dir / 'kresd.conf'], check: false).returncode() == 1
install_kresd_conf = true
endif
endif
......
......@@ -15,8 +15,6 @@
#include "contrib/ucw/lib.h"
#include "lib/cache/cdb_lmdb.h"
#include "lib/cache/cdb_api.h"
#include "lib/cache/api.h"
#include "lib/cache/impl.h"
#include "lib/utils.h"
......@@ -381,9 +379,10 @@ static int cdb_open_env(struct lmdb_env *env, const char *path, const size_t map
} else {
ret = 0;
}
if (ret == EINVAL) {
if (ret == EINVAL || ret == EOPNOTSUPP) {
/* POSIX says this can happen when the feature isn't supported by the FS.
* We haven't seen this happen on Linux+glibc but it was reported on FreeBSD.*/
* We haven't seen this happen on Linux+glibc but it was reported on
* Linux+musl and FreeBSD. */
kr_log_info(CACHE, "space pre-allocation failed and ignored; "
"your (file)system probably doesn't support it.\n");
} else if (ret != 0) {
......
......@@ -75,7 +75,7 @@ static int nsec_p_ttl(knot_db_val_t entry, const uint32_t timestamp, int32_t *ne
static uint8_t get_lowest_rank(const struct kr_query *qry, const knot_dname_t *name, const uint16_t type)
{
/* Shut up linters. */
if (unlikely(!qry || !qry->request)) abort();
kr_require(qry && qry->request);
/* TODO: move rank handling into the iterator (DNSSEC_* flags)? */
const bool allow_unverified =
knot_wire_get_cd(qry->request->qsource.packet->wire) || qry->flags.STUB;
......
......@@ -23,7 +23,6 @@
#include <libknot/rrtype/rdname.h>
#include <libknot/rrtype/rrsig.h>
#include "kresconfig.h"
#include "lib/layer/iterate.h"
#include "lib/resolve.h"
#include "lib/rplan.h"
......
......@@ -11,7 +11,6 @@
#include <libknot/descriptor.h>
#include <ucw/mempool.h>
#include <sys/socket.h>
#include "kresconfig.h"
#include "lib/resolve.h"
#include "lib/layer.h"
#include "lib/rplan.h"
......
......@@ -7,9 +7,6 @@
#include "lib/rplan.h"
#include "lib/resolve.h"
#include "lib/cache/api.h"
#include "lib/defines.h"
#include "lib/layer.h"
#define VERBOSE_MSG(qry, ...) kr_log_q(qry, PLAN, __VA_ARGS__)
......@@ -28,7 +25,7 @@ inline static unsigned char chars_mask(const unsigned char a, const unsigned cha
inline static void kr_qflags_mod(struct kr_qflags *fl1, struct kr_qflags fl2,
unsigned char mod(const unsigned char a, const unsigned char b))
{
if (!fl1) abort();
kr_require(fl1);
union {
struct kr_qflags flags;
/* C99 section 6.5.3.4: sizeof(char) == 1 */
......
......@@ -3,15 +3,10 @@
#include "lib/selection.h"
#include "lib/selection_forward.h"
#include "lib/selection_iter.h"
#include "lib/generic/pack.h"
#include "lib/generic/trie.h"
#include "lib/rplan.h"
#include "lib/cache/api.h"
#include "lib/resolve.h"
#include "daemon/worker.h"
#include "daemon/tls.h"
#include "lib/utils.h"
#define VERBOSE_MSG(qry, ...) kr_log_q((qry), SELECTION, __VA_ARGS__)
......