protobuf-compiler \
virtualenv
+ install-ixfrdist-deps:
+ description: "Install all libraries needed for testing ixfrdist"
+ steps:
+ - run: apt-get update
+ - run:
+ command: |
+ apt-get install -qq -y \
+ libboost-all-dev \
+ libsystemd0 \
+ libyaml-cpp0.5v5 \
+ virtualenv
+
install-auth-dev-deps:
description: Install all packages needed to build the auth
steps:
libsqlite3-dev \
libssl-dev \
libtool \
+ libyaml-cpp-dev \
make \
pkg-config \
ragel \
--enable-tools \
--with-lmdb=/usr \
--with-libsodium \
- --prefix=/opt/pdns-auth
+ --prefix=/opt/pdns-auth \
+ --enable-ixfrdist
- run:
name: build
command: make -j3 -k
DNSDISTBIN="/opt/dnsdist/bin/dnsdist" \
./runtests
+ test-ixfrdist-regression:
+ docker:
+ - image: debian:stretch
+ environment:
+ UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
+ steps:
+ - install-ixfrdist-deps
+ - checkout-shallow
+ - attach_workspace:
+ at: /opt
+ - run:
+ name: Run ixfrdist tests
+ workdir: ~/project/regression-tests.ixfrdist
+ command: |
+ IXFRDISTBIN="/opt/pdns-auth/bin/ixfrdist" \
+ ./runtests
+
workflows:
version: 2
coverity:
- test-dnsdist-regression:
requires:
- build-dnsdist
+ - test-ixfrdist-regression:
+ requires:
+ - build-auth
build-docs:
jobs:
Built-in Webserver and HTTP API
===============================
-The PowerDNS Authoritative Server features a built-in built-in webserver that exposes a JSON/REST API.
+The PowerDNS Authoritative Server features a built-in webserver that exposes a JSON/REST API.
This API allows for controlling several functions, reading statistics and modifying zone content, metadata and DNSSEC key material.
Webserver
#include <iostream>
#include <unistd.h>
#include "misc.hh"
-#include "syncres.hh"
#include "namespaces.hh"
{
pw.startRecord(record.d_name + zoneName, record.d_type, record.d_ttl, QClass::IN, DNSResourceRecord::ANSWER, compress);
record.d_content->toPacket(pw);
- if (pw.size() > 65535) {
+ if (pw.size() > 16384) {
pw.rollback();
return false;
}
DLOG(g_log<<Logger::Error<<"lookup: "<<shorter<<endl);
if((*i)->getAuth(shorter, sd)) {
DLOG(g_log<<Logger::Error<<"got: "<<sd->qname<<endl);
- if(!shorter.isPartOf(sd->qname) && !sd->qname.empty()) {
+ if(!sd->qname.empty() && !shorter.isPartOf(sd->qname)) {
throw PDNSException("getAuth() returned an SOA for the wrong zone. Zone '"+sd->qname.toLogString()+"' is not part of '"+shorter.toLogString()+"'");
}
j->first = sd->qname.wirelength();
from ixfrdisttests import IXFRDistTest
-from xfrserver.xfrserver import AXFRServer
import time
import requests
-zones = {
- 1: """
-$ORIGIN example.
-@ 86400 SOA foo bar 1 2 3 4 5
-@ 4242 NS ns1.example.
-@ 4242 NS ns2.example.
-ns1.example. 4242 A 192.0.2.1
-ns2.example. 4242 A 192.0.2.2
-"""}
-
xfrServerPort = 4244
-xfrServer = AXFRServer(xfrServerPort, zones)
class IXFRDistStatsTest(IXFRDistTest):
"""