]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #8053 from Habbie/pdnsutil-dead-code
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 11 Jul 2019 23:50:12 +0000 (01:50 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Jul 2019 23:50:12 +0000 (01:50 +0200)
pdnsutil: remove unused humanTime function

.circleci/config.yml
docs/http-api/index.rst
pdns/devpollmplexer.cc
pdns/ixfrdist.cc
pdns/ueberbackend.cc
regression-tests.ixfrdist/test_Stats.py

index ac24a12654d4b66254cd155ccbd18fb92be1f2fe..a1fb92dba68db7fda16fba154372c3814b0c3e44 100644 (file)
@@ -194,6 +194,18 @@ commands:
               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:
@@ -220,6 +232,7 @@ commands:
               libsqlite3-dev \
               libssl-dev \
               libtool \
+              libyaml-cpp-dev \
               make \
               pkg-config \
               ragel \
@@ -462,7 +475,8 @@ jobs:
               --enable-tools \
               --with-lmdb=/usr \
               --with-libsodium \
-              --prefix=/opt/pdns-auth
+              --prefix=/opt/pdns-auth \
+              --enable-ixfrdist
       - run:
           name: build
           command: make -j3 -k
@@ -1235,6 +1249,23 @@ jobs:
             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:
@@ -1305,6 +1336,9 @@ workflows:
       - test-dnsdist-regression:
           requires:
             - build-dnsdist
+      - test-ixfrdist-regression:
+          requires:
+            - build-auth
 
   build-docs:
     jobs:
index 0b54204ece0b296c37de0281f261d861128e70f8..4a81db80b29adf74eaceb8541cac2a9eea187a86 100644 (file)
@@ -1,7 +1,7 @@
 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
index 35df6dc8fc9940f5e498d409a4cab5659da1ce6d..37d396062a07e630bc003828dd1579cb2e75a9ac 100644 (file)
@@ -33,7 +33,6 @@
 #include <iostream>
 #include <unistd.h>
 #include "misc.hh"
-#include "syncres.hh"
 
 #include "namespaces.hh"
 
index d23d554cbe245d1121880319a5cb95d7e709c59c..0b7f58f235269538c0c16abda599e82856cd5667 100644 (file)
@@ -573,7 +573,7 @@ static bool addRecordToWriter(DNSPacketWriter& pw, const DNSName& zoneName, cons
 {
   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;
   }
index 2c3dd363b04d4ef65a7d74c325c0c494ede9d86e..e33b9030ea669dd4e6187689fec85c720ce346b0 100644 (file)
@@ -330,7 +330,7 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s
           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();
index 3ded02822eef0699a164382d2ec1bd86db24c447..f170a6732e87a62b524997f77fb2d6ecf3e4fa45 100644 (file)
@@ -1,20 +1,8 @@
 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):
     """