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 (6415)
;; emacs local configuration settings for knot source
;; surmised by dkg on 2017-03-25 12:15:55-0500
((c-mode
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 8)
(c-file-style . "linux"))
)
.git
......@@ -7,24 +7,15 @@
*.lo
*.rej
*.pyc
*.pc
.libs/
.deps/
.dirstamp
/tmp
/Knot.creator.user*
/Makefile
/Makefile.in
/src/Makefile
/src/Makefile.in
/src/zscanner/Makefile
/src/zscanner/Makefile.in
/python/Makefile
/python/Makefile.in
/samples/Makefile
/samples/Makefile.in
/samples/knot.sample.conf
/doc/Makefile
/doc/Makefile.in
/Knot.cflags
/Knot.cxxflags
/Doxyfile
/aclocal.m4
/ar-lib
/autoscan.log
......@@ -45,16 +36,19 @@
/src/config.h
/src/config.h.in
/src/stamp-*
/doc/html/
/INSTALL
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/src/dnssec/libdnssec.pc
/src/libknot.pc
/src/libknot/version.h
/test-driver
Makefile
Makefile.in
/src/lib*/version.h
/samples/knot.sample.conf
/src/knot/modules/static_modules.h
# dnstap
/src/contrib/dnstap/Makefile
......@@ -63,35 +57,48 @@
/src/contrib/dnstap/dnstap.pb-c.h
# zscanner
/src/zscanner/libzscanner.pc
/src/zscanner/scanner.c
/src/zscanner/tests/tmp/
/src/zscanner/tests/unittests
/src/zscanner/tests/zscanner-tool
/src/zscanner/version.h
/src/libzscanner/scanner.c
# xdp
/src/libknot/xdp/bpf-kernel.ll
# Binaries
/src/kcatalogprint
/src/kdig
/src/keymgr
/src/khost
/src/kjournalprint
/src/knot1to2
/src/knotc
/src/knotd
/src/knsec3hash
/src/knsupdate
/src/kxdpgun
/src/kzonecheck
/src/rosedb_tool
# Plugin binaries
/src/rosedb_tool
/src/kzonesign
# Generated tarballs
/knot-*.tar.gz
/knot-*.tar.xz
# Packaging output
/pkg
# Code coverage
*.gcda
*.gcno
/coverage.info
/coverage.html
# Vagrant
.vagrant
# eclipse
/.project
/.cproject
/.settings/
# cygwin
*.exe
*.exe.manifest
# clang
.qtc_clangd
variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C.UTF-8
LC_ALL: C
GIT_STRATEGY: fetch
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: recursive
DISTROTEST_PRIORITY: 6
PKGTEST: 0
stages:
- configure
- image
- build
- test
- deploy
- pkg
- documentation
.debian_stretch: &debian_stretch
image: cznic/debian:stretch-knot-v2
.image: &image
stage: image
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --no-cache -t "$IMAGE_TAG" "scripts/docker/$IMAGE_NAME-$IMAGE_VER"
- docker push "$IMAGE_TAG"
tags:
- dind
only:
variables:
- $SCHEDULE_TYPE == "weekly"
docker:knot-dns:debian:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:debian-arm64:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME-arm64:$IMAGE_VER
tags:
- dind
- arm64
docker:knot-dns:debian:unstable:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: unstable
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:ubuntu:
<<: *image
variables:
IMAGE_NAME: ubuntu
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:rocky:
<<: *image
variables:
IMAGE_NAME: rocky
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:fedora:
<<: *image
variables:
IMAGE_NAME: fedora
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
.fedora_latest: &fedora_latest
image: "$CI_REGISTRY/knot/knot-dns/fedora:latest"
tags:
- docker
- linux
- amd64
.ubuntu_xenial: &ubuntu_xenial
image: cznic/ubuntu:16.04-knot
except:
- schedules
.rocky_latest: &rocky_latest
image: "$CI_REGISTRY/knot/knot-dns/rocky:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.debian_stretch_armel: &debian_stretch_armel
image: cznic/armel-debian-knot
.debian_stable: &debian_stable
image: "$CI_REGISTRY/knot/knot-dns/debian:latest"
tags:
- docker
- linux
- arm
- amd64
except:
- schedules
.configure: &configure_job
stage: configure
script:
- autoreconf -fi
- ./configure --disable-fastparser
artifacts:
untracked: true
expire_in: '1 hour'
.debian_stable_arm64: &debian_stable_arm64
image: "$CI_REGISTRY/knot/knot-dns/debian-arm64:latest"
tags:
- docker
- linux
- arm64
except:
- schedules
.debian_unstable: &debian_unstable
image: "$CI_REGISTRY/knot/knot-dns/debian:unstable"
tags:
- docker
- linux
- amd64
except:
- schedules
.ubuntu_latest: &ubuntu_latest
image: "$CI_REGISTRY/knot/knot-dns/ubuntu:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.build: &build_job
stage: build
script:
- make -k all
- autoreconf -fi
- ./configure --disable-fastparser --enable-quic $EXTRA_CONFIGURE || ( cat config.log && exit 1 )
- make all V=1
artifacts:
untracked: true
expire_in: '1 hour'
except:
- schedules
.test: &test_job
stage: test
before_script:
- find -exec touch -t $(date +%m%d%H%M) {} \;
script:
- make -k check
configure:ubuntu:amd64:
<<: *ubuntu_xenial
<<: *configure_job
- make check V=1
except:
- tags
- docs-*
- schedules
build:ubuntu:amd64:
<<: *ubuntu_xenial
build:fedora:amd64:
<<: *fedora_latest
<<: *build_job
test:fedora:amd64:
<<: *fedora_latest
<<: *test_job
dependencies:
- configure:ubuntu:amd64
except:
- tags
- docs-*
- build:fedora:amd64
build:rocky:amd64:
<<: *rocky_latest
<<: *build_job
test:rocky:amd64:
<<: *rocky_latest
<<: *test_job
dependencies:
- build:rocky:amd64
build:ubuntu:amd64:
<<: *ubuntu_latest
<<: *build_job
test:ubuntu:amd64:
<<: *ubuntu_xenial
<<: *ubuntu_latest
<<: *test_job
dependencies:
- build:ubuntu:amd64
except:
- tags
- docs-*
configure:debian:stretch:amd64:
<<: *debian_stretch
<<: *configure_job
build:debian:stretch:amd64:
<<: *debian_stretch
build:debian:amd64:
variables:
EXTRA_CONFIGURE: --enable-xdp=yes
<<: *debian_stable
<<: *build_job
except: # run on schedules as well, for debian:symbols tests
test:debian:amd64:
<<: *debian_stable
<<: *test_job
dependencies:
- configure:debian:stretch:amd64
- build:debian:amd64
test:debian:stretch:amd64:
<<: *debian_stretch
build:debian:arm64:
<<: *debian_stable_arm64
<<: *build_job
test:debian:arm64:
<<: *debian_stable_arm64
<<: *test_job
dependencies:
- build:debian:stretch:amd64
- build:debian:arm64
configure:debian:stretch:armel:
<<: *debian_stretch_armel
<<: *configure_job
only:
- triggers
build:debian:unstable:amd64:
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64
build:debian:stretch:armel:
<<: *debian_stretch_armel
build:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2 -fno-omit-frame-pointer"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- configure:debian:stretch:armel
only:
- triggers
- build:debian:unstable:amd64:asan
test:debian:stretch:armel:
<<: *debian_stretch_armel
build:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:stretch:armel
- build:debian:unstable:amd64:ubsan
build:archive:
<<: *debian_stable
stage: build
script:
- autoreconf -fi
- mkdir _build
- cd _build
- ../configure
- make distcheck V=1 DISTCHECK_CONFIGURE_FLAGS="--disable-static" -j2
- make html singlehtml
only:
- master
- tags
- triggers
- schedules
except: []
artifacts:
paths:
- _build/*.tar.xz
- _build/doc/_build/html
- _build/doc/_build/singlehtml
pages:
stage: documentation
needs:
- build:archive
script:
- mkdir -p public/master
- mv _build/doc/_build/html public/master/html
- mv _build/doc/_build/singlehtml public/master/singlehtml
only:
- master
artifacts:
paths:
- public
build:documentation:
<<: *debian_stretch
stage: build
dependencies:
- configure:debian:stretch:amd64
<<: *debian_stable
stage: documentation
only:
- tags
- triggers
- docs-*
dependencies:
- build:debian:amd64
script:
- make -C doc html singlehtml pdf
- make -C doc html singlehtml pdf epub V=1
artifacts:
paths:
- doc/_build/html/
- doc/_build/singlehtml/
- doc/_build/latex/knot.pdf
- doc/_build/latex/KnotDNS.pdf
- doc/_build/epub/KnotDNS.epub
expire_in: '1 hour'
deploy:documentation:
<<: *debian_stretch
stage: deploy
before_script:
- apt-get -y install curl
# packaging tests using apkg
.apkg_image: &apkg_image
# apkg images use LC_ALL=C.UTF-8
variables:
LC_ALL: C.UTF-8
.pkg_test: &pkg_test
<<: *apkg_image
stage: pkg
needs:
- pkg:make-archive
only:
- tags
- triggers
- docs-*
variables:
- $PKGTEST == "1"
artifacts:
paths:
- pkg/
expire_in: '1 week'
script:
- "curl --http1.1 --request POST --form token=$WEBSITE_TOKEN --form ref=master --form \"variables[RELEASE_CI_BUILD_REF_NAME]=$CI_BUILD_REF_NAME\" --form \"variables[RELEASE_CI_BUILD_ID]=$CI_BUILD_ID\" https://gitlab.labs.nic.cz/api/v3/projects/5/trigger/builds"
- python3 -m pip install git+https://gitlab.nic.cz/packaging/apkg.git
# make sure the archive from pkg:make-archive is available
- apkg info cache | grep archive/dev
- apkg install --build-dep
- apkg test --test-dep
.pkg_test_deb: &pkg_test_deb
<<: *pkg_test
before_script:
- apt update
pkg:make-archive:
# archive is created once and reused in other pkg jobs
<<: *apkg_image
stage: pkg
needs:
- build:debian:amd64
only:
variables:
- $PKGTEST == "1"
image: $CI_REGISTRY/packaging/apkg/test/debian-12
artifacts:
name: "knot-dns-$CI_BUILD_REF_NAME-doc"
paths:
- doc/_build/html/
- doc/_build/singlehtml/
- doc/_build/latex/knot.pdf
- pkg/
before_script:
- apt update
script:
- python3 -m pip install apkg
- apkg build-dep
- apkg make-archive
pkg:debian-13:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-13
pkg:debian-12:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-12
pkg:debian-11:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-11
pkg:ubuntu-24.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-24.04
pkg:ubuntu-22.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-22.04
pkg:ubuntu-20.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-20.04
pkg:fedora-41:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-41
pkg:fedora-40:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-40
pkg:alma-9:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/alma-9
pkg:rocky-8:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/rocky-8
pkg:opensuse-15.6:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/opensuse-15.6
[submodule "tests-fuzz/fuzz_zscanner.in"]
path = tests-fuzz/fuzz_zscanner.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_zscanner.in.git
[submodule "tests-fuzz/fuzz_packet.in"]
path = tests-fuzz/fuzz_packet.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_packet.in.git
#!/usr/bin/python -Es
# vim: et:ts=4:sw=4:colorcolumn=100
#
# Configuration for You Complete Me (YCM) code-completion engine for Vim.
#
# This file is released into the public domain.
#
import sys
import os
DIR = os.path.dirname(__file__)
FLAGS = [
'-std=gnu99',
'-Wall', '-Wno-unused', '-Werror=implicit', '-Wno-#warnings',
'-DCONFIG_DIR=', '-DRUN_DIR=', '-DSTORAGE_DIR=', '-DPACKAGE_VERSION=',
]
CONFIG_H = 'src/config.h'
INCLUDES = [
('src/dnssec/shared', ['src/dnssec/lib', 'src/dnssec/lib/dnssec']),
('src/dnssec/lib', ['src/dnssec/shared', 'src/dnssec/lib/dnssec']),
('src/dnssec/tests', ['src/dnssec/shared', 'src/dnssec/lib', 'src/dnssec/lib/dnssec', 'libtap']),
('src/utils/keymgr', ['src/dnssec', 'src/dnssec/lib', 'src']),
('src/utils/knsec3hash', ['src/dnssec', 'src/dnssec/lib', 'src']),
('src', ['src/dnssec/lib']),
('tests', ['src', 'src/dnssec/lib', 'libtap']),
]
def relative_path(filename):
return os.path.relpath(filename, DIR)
def absolute_path(filename):
return os.path.normpath(os.path.join(DIR, filename))
def includes_for(filename):
relative = relative_path(filename)
for prefix, includes in INCLUDES:
if relative.startswith(prefix + '/'):
return [prefix] + includes
return []
def include_flag(path):
return "-I%s" % absolute_path(path)
def FlagsForFile(filename):
# input filename is an absolute path
config = ["-include", absolute_path(CONFIG_H)]
includes = [include_flag(f) for f in includes_for(filename)]
return {'flags': FLAGS + config + includes, 'do_cache': True}
if __name__ == '__main__':
print >>sys.stderr, "Not runnable."
sys.exit(1)
Ľuboš Slovák
Marek Vavruša
Jan Kadlec
Daniel Salzman
Jan Včelák
Dominik Táborský
Vítězslav Kříž
Ondřej Surý
Ondřej Filip
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
......@@ -664,24 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
In addition, as a special exception, the copyright holders give
permission to link the code of portions of this program with the
OpenSSL library under certain conditions as described in each
individual source file, and distribute linked combinations including
the two.
You must obey the GNU General Public License in all respects for all
of the code used other than OpenSSL. If you modify file(s) with this
exception, you may extend this exception to your version of the
file(s), but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version. If you delete
this exception statement from all source files in the program, then
also delete it here.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
## Intermediate stage ##
FROM debian:bookworm-slim AS builder
# Environment
ENV BUILD_PKGS \
autoconf \
automake \
gcc \
libbpf-dev \
libedit-dev \
libfstrm-dev \
libgnutls28-dev \
libidn2-dev \
liblmdb-dev \
libmaxminddb-dev \
libmnl-dev \
libnghttp2-dev \
libngtcp2-crypto-gnutls-dev \
libngtcp2-dev \
libprotobuf-c-dev \
libsystemd-dev \
libtool \
liburcu-dev \
libxdp-dev \
make \
pkg-config \
protobuf-c-compiler
# Install dependencies
RUN apt-get update && \
apt-get install -yqq ${BUILD_PKGS}
# Build the project
COPY . /knot-src
WORKDIR /knot-src
ARG FASTPARSER=disable
RUN autoreconf -if && \
CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=3 -fstack-protector-strong" \
./configure --prefix=/ \
--with-rundir=/rundir \
--with-storage=/storage \
--with-configdir=/config \
--with-module-dnstap=yes \
--${FASTPARSER}-fastparser \
--enable-quic \
--enable-dnstap \
--disable-static \
--disable-documentation && \
make -j$(grep -c ^processor /proc/cpuinfo)
# Run unittests if requested and install the project
ARG CHECK=disable
RUN if [ "$CHECK" = "enable" ]; then make -j$(grep -c ^processor /proc/cpuinfo) check; fi && \
make install DESTDIR=/tmp/knot-install
## Final stage ##
FROM debian:bookworm-slim
LABEL maintainer="Knot DNS <knot-dns@labs.nic.cz>"
# Environment
ENV RUNTIME_PKGS \
dbus \
libbpf1 \
libedit2 \
libfstrm0 \
libgnutls30 \
libidn2-0 \
liblmdb0 \
libmaxminddb0 \
libmnl0 \
libnghttp2-14 \
libngtcp2-crypto-gnutls2 \
libngtcp2-9 \
libprotobuf-c1 \
liburcu8 \
libxdp1
# Install dependencies and create knot user and group
ARG UID=53
RUN apt-get update && \
apt-get install -yqq ${RUNTIME_PKGS} adduser && \
rm -rf /var/lib/apt/lists/* && \
ldconfig && \
adduser --quiet --system --group --no-create-home --home /storage --uid=${UID} knot && \
install -o knot -g knot -d /config /rundir /storage
# Copy artifacts
# `COPY --from=builder /tmp/knot-install/ /` doesn't work with DOCKER_BUILDKIT=1 under buildx
COPY --from=builder /tmp/knot-install/bin/ /bin/
COPY --from=builder /tmp/knot-install/config/ /config/
COPY --from=builder /tmp/knot-install/include/ /include/
COPY --from=builder /tmp/knot-install/lib/ /lib/
COPY --from=builder /tmp/knot-install/sbin/ /sbin/
# Prepare configurations for optional D-Bus signaling
COPY --from=builder /knot-src/distro/common/system-local.conf /etc/dbus-1/
COPY --from=builder /knot-src/distro/common/cz.nic.knotd.conf /usr/share/dbus-1/system.d/
RUN mkdir -p /run/dbus
# Expose port
EXPOSE 53/UDP
EXPOSE 53/TCP
EXPOSE 853/UDP
EXPOSE 853/TCP
# Prepare shared directories
VOLUME /config
VOLUME /rundir
VOLUME /storage
/*!
\defgroup server Server control module.
\defgroup threading Threading API.
\defgroup network Socket API.
\defgroup config Server configuration.
\defgroup query_processing DNS query processing.
\defgroup utils Utilities, constants and macros.
\defgroup debugging Server debugging API.
\defgroup logging Server logging API.
\defgroup statistics Statistics module (optional).
\defgroup libknot libknot - library of DNS-related functions
\defgroup hashing Hash table and functions.
\defgroup common_lib Common library.
\defgroup alloc Memory allocation.
\defgroup tests Unit tests.
\defgroup zoneparser Zone compiler utility
\defgroup ctl Control utility
\defgroup zone-load-dump Zone loading and dumping
\defgroup xfr Zone transfers
\defgroup zone_scanner Zone scanner (core)
\defgroup zone_scanner_test Zone scanner testing environment
\defgroup knot_utils DNS utilities like host, dig and nsupdate
\mainpage Knot API documentation.
Knot is an open-source, high-performace, purely authoritative DNS server.
<h2>Features</h2>
Knot DNS supports the following DNS features:
- TCP/UDP protocols
- AXFR - master, slave
- IXFR - master (primary master experimental), slave
- TSIG
- EDNS0
- DNSSEC, including NSEC3
- NSID
- Unknown RR types
Server features:
- Adding/removing zones on-the-fly
- Reconfiguring server instance on-the-fly
- IPv4 / IPv6 support
- Semantic checks of zones
<h2>Compiling and running the server</h2>
See the User manual - links to current version are provided in the
<a href="https://git.nic.cz/redmine/projects/knot-dns/wiki">Knot DNS Wiki</a>.
Alternatively you can generate the manual from the sources in Info format:
\code
$ make doc
\endcode
or in PDF:
\code
$ make pdf
\endcode
<h2>Server modules</h2>
- \ref server
- \ref threading
- \ref network
- \ref config
- \ref query_processing
- \ref utils
- \ref debugging
- \ref logging
- \ref statistics
<h2>DNS library</h2>
- \ref libknot
- \ref hashing
- \ref xfr
<h2>Zone processing</h2>
- \ref zoneparser
- \ref zone-load-dump
- \ref zone_scanner
- \ref zone_scanner_test
<h2>Common library</h2>
- \ref common_lib
- \ref alloc
<h2>Other modules</h2>
- \ref tests
- \ref ctl
*/
This diff is collapsed.
./src/config.h
\ No newline at end of file
This diff is collapsed.
libtap
src
src/contrib
src/dnssec
src/dnssec/lib
src/dnssec/lib/dnssec
src/dnssec/shared
src/zscanner
src/contrib/dnstap
src/contrib/libngtcp2
src/contrib/libngtcp2/ngtcp2
src/contrib/libngtcp2/ngtcp2/crypto
src/contrib/libngtcp2/ngtcp2/lib
src/contrib/licenses
src/contrib/openbsd
src/contrib/proxyv2
src/contrib/qp-trie
src/contrib/ucw
src/contrib/url-parser
src/contrib/vpool
src/knot
src/knot/catalog
src/knot/common
src/knot/conf
src/knot/ctl
src/knot/dnssec
src/knot/dnssec/kasp
src/knot/events
src/knot/events/handlers
src/knot/include
src/knot/journal
src/knot/modules
src/knot/modules/cookies
src/knot/modules/dnsproxy
src/knot/modules/dnstap
src/knot/modules/geoip
src/knot/modules/noudp
src/knot/modules/onlinesign
src/knot/modules/probe
src/knot/modules/queryacl
src/knot/modules/rrl
src/knot/modules/stats
src/knot/modules/synthrecord
src/knot/modules/whoami
src/knot/nameserver
src/knot/query
src/knot/server
src/knot/updates
src/knot/worker
src/knot/zone
src/libdnssec
src/libdnssec/key
src/libdnssec/keystore
src/libdnssec/nsec
src/libdnssec/p11
src/libdnssec/shared
src/libdnssec/sign
src/libknot
src/libknot/control
src/libknot/db
src/libknot/packet
src/libknot/probe
src/libknot/rrtype
src/libknot/xdp
src/libknot/yparser
src/libzscanner
src/utils
src/utils/common
src/utils/kcatalogprint
src/utils/kdig
src/utils/keymgr
src/utils/khost
src/utils/kjournalprint
src/utils/knotc
src/utils/knotd
src/utils/knsec3hash
src/utils/knsupdate
src/utils/knsupdate/tests
src/utils/kxdpgun
src/utils/kzonecheck
src/utils/kzonesign
tests
tests/contrib
tests-fuzz
tests-fuzz/wrap
tests-fuzz/check
tests-fuzz/knotd_wrap
tests/knot
tests/knot/semantic_check_data
tests/libdnssec
tests/libknot
tests/libzscanner
tests/libzscanner/data
tests/libzscanner/data/includes
tests/modules
tests/tap
tests/utils
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libtap src tests tests-fuzz python samples doc
SUBDIRS = src tests tests-fuzz python samples distro doc
.PHONY: singlehtml install-singlehtml
singlehtml install-singlehtml:
EXTRA_DIST = README.md
.PHONY: singlehtml epub install-singlehtml install-epub
singlehtml install-singlehtml epub install-epub:
$(MAKE) -C doc $@
.PHONY: check-compile
check-compile:
$(MAKE) $(AM_MAKEFLAGS) -C libtap $@
$(MAKE) $(AM_MAKEFLAGS) -C src $@
$(MAKE) $(AM_MAKEFLAGS) -C tests $@
$(MAKE) $(AM_MAKEFLAGS) -C tests-fuzz $@
......@@ -18,11 +18,10 @@ CODE_COVERAGE_INFO = coverage.info
CODE_COVERAGE_HTML = coverage.html
CODE_COVERAGE_DIRS = \
src/contrib \
src/dnssec/lib \
src/dnssec/shared \
src/knot \
src/libdnssec \
src/libknot \
src/zscanner
src/libzscanner
code_coverage_quiet = --quiet
......
This diff is collapsed.
Dependencies
============
Knot DNS has several dependencies:
* libtool
* autoconf > 2.65
* pkg-config
* liburcu >= 0.5.4
* gnutls >= 3.0
* jansson >= 2.3
* libedit
Embedded libraries:
* lmdb (system library is preferred)
Optional packages:
* libcap-ng >= 0.6.4 (for POSIX 1003.1e capabilities(7))
* libidn (for IDNA2003 support in Knot utilities)
* libsystemd (for systemd init system support)
Dependencies for building documentation:
* python-sphinx
Installation
============
Knot DNS may already be included in your operating system distribution and
therefore can be installed from packages (Linux), ports (BSD) or via
Homebrew (Mac). This is always preferred unless you want to test the latest
features, contribute to Knot development, or you just know what you are doing.
Following sections describe how to build Knot DNS from the source code.
1) Install prerequisites
Debian based distributions
--------------------------
Update the system:
$ sudo apt-get update
$ sudo apt-get upgrade
Install prerequisites:
$ sudo apt-get install \
libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libjansson-dev libedit-dev
Install optional packages to override embedded libraries:
$ sudo apt-get install liblmdb-dev
Install optional packages:
$ sudo apt-get install libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev
Fedora like distributions
-------------------------
Update the system:
# dnf upgrade
Install basic development tools:
# dnf install @buildsys-build
Install prerequisites:
# dnf install \
libtool autoconf pkgconfig automake userspace-rcu-devel gnutls-devel jansson-devel libedit-devel
Install optional packages to override embedded libraries:
# dnf install lmdb-devel
Install optional packages:
# dnf install libcap-ng-devel systemd-devel libidn-devel protobuf-c-devel fstrm-devel
When compiling on RHEL based system, the Fedora EPEL repository has to be
enabled. Also for RHEL 6, forward compatibility package gnutls30-devel
with newer GnuTLS is required instead of gnutls-devel.
2) Install Knot DNS
Knot DNS requires compiler to support atomic intrinsics.
GCC version at least 4.1 supports legacy atomic builtins, however 4.7
or newer is preferred. Clang supports atomics since version 2.9.
Get the source code:
$ git clone git://git.nic.cz/knot-dns.git
Or extract source package to knot-dns directory
Compile Knot
$ cd knot-dns
$ autoreconf -if
$ ./configure
$ make
Install Knot DNS into system:
$ sudo make install
$ sudo ldconfig
NOTE: If you want to reduce zscanner compile time, use configure option --disable-fastparser.
Running
=======
1) Each server needs configuration file. Please see samples/knot.sample.conf,
project documentation, or man 5 knot.conf for more details.
Configuration file has to specify:
- storage for PID files, journal files etc.
- network interfaces
- served zones
E.g. use the default config file:
$ cd /etc/knot
$ mv knot.sample.conf knot.conf
Modify the config:
$ editor knot.conf
2) Prepare working directory
$ mv example.com.zone /var/lib/knot/
3) Start the server. This can be done by running the 'knotd' command.
Alternatively, your distribution should have an init script available, if you've
installed Knot using a binary package.
Start Knot in the foreground to see if it runs:
$ knotd -c myserver.conf
For more information, refer to the user manual or:
$ knotc -h
$ knotd -h
Join the chat at https://gitter.im/CZ-NIC/knot
[![Coverity Status](https://img.shields.io/coverity/scan/knot-dns.svg)](https://scan.coverity.com/projects/knot-dns)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/knot-dns.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:knot-dns)
# Requirements
[doc/requirements.rst](doc/requirements.rst)
# Installation
[doc/installation.rst](doc/installation.rst)
## 1. Install prerequisites
### Debian based distributions
#### Update the system:
```bash
sudo apt-get update
sudo apt-get upgrade
```
#### Install prerequisites:
```bash
sudo apt-get install \
libtool autoconf automake make pkg-config liburcu-dev libgnutls28-dev libedit-dev liblmdb-dev
```
#### Install optional packages:
```bash
sudo apt-get install \
libcap-ng-dev libsystemd-dev libidn2-dev libprotobuf-c-dev protobuf-c-compiler libfstrm-dev libmaxminddb-dev libnghttp2-dev libbpf-dev libxdp-dev libmnl-dev python3-sphinx python3-sphinx-panels softhsm2
```
### Fedora like distributions
#### Update the system:
```bash
dnf upgrade
```
#### Install basic development tools:
```bash
dnf install @buildsys-build
```
#### Install prerequisites:
```bash
dnf install \
libtool autoconf automake pkgconfig userspace-rcu-devel gnutls-devel libedit-devel lmdb-devel
```
#### Install optional packages:
```bash
dnf install \
libcap-ng-devel systemd-devel libidn2-devel protobuf-c-devel fstrm-devel libmaxminddb-devel libnghttp2-devel libbpf-devel libxdp-devel libmnl-devel python-sphinx python-sphinx-panels softhsm
```
When compiling on RHEL based system, the Fedora EPEL repository has to be
enabled.
## 2. Install Knot DNS
Get the source code:
```bash
git clone https://gitlab.nic.cz/knot/knot-dns.git
```
Or extract source package to knot-dns directory.
Compile the source code:
```bash
cd knot-dns
autoreconf -if
./configure
make
```
Install Knot DNS into system:
```bash
sudo make install
sudo ldconfig
```
# Running
### 1. Ensure some configuration
[doc/configuration.rst](doc/configuration.rst)
Please see [samples/knot.sample.conf](samples/knot.sample.conf),
[project documentation](https://www.knot-dns.cz/documentation/),
or `man 5 knot.conf` for more details. Basically the configuration should specify:
- network interfaces
- served zones
E.g. use the default configuration file:
```bash
cd /etc/knot
mv knot.sample.conf knot.conf
```
Modify the configuration file:
```bash
editor knot.conf
```
### 2. Prepare working directory
```bash
mv example.com.zone /var/lib/knot/
```
### 3. Start the server
[doc/operation.rst](doc/operation.rst)
This can be done by running the `knotd` command. Alternatively, your distribution
should have an init script available, if you installed Knot DNS from a binary package.
Start the server in foreground to see if it runs:
```bash
knotd -c /etc/knot/knot.conf
```
Knot DNS was originally written by CZ.NIC Labs. It would not be what
it is today without the invaluable help of these people, who have
reported problems, suggested improvements, or submitted actual code.
Please help us keep this list complete and free from errors. Also see
the AUTHORS file for the list of people with contributions significant
enough to warrant copyright assignment.
Anton Shterenlikht mexas@bristol.ac.uk
Geert Hendrickx geert@hendrickx.be
Michal 'vorner' Vaner vorner@ucw.cz
Ondřej Caletka ondrej@caletka.cz
Anand Buddhdev anandb@ripe.net