Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlexis committed Jan 13, 2017
2 parents 5cdfa87 + 6f3c797 commit f16cc65
Show file tree
Hide file tree
Showing 243 changed files with 6,537 additions and 2,244 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- Before filing an issue, please search the existing issues (both open and closed) to see if your report might be duplicate -->
<!-- Please don't file an issue when you have a support question, send support questions to the mailinglist or ask them on IRC (https://www.powerdns.com/opensource.html) -->

<!-- Tell us what is issue is about -->
- Program: Authoritative, Recursor, dnsdist <!-- delete the ones that do not apply -->
- Issue type: Bug report/Feature request <!-- delete the one that does not apply -->

### Short description
<!-- Explain in a few sentences what the issue/request is -->




<!--
If this is a bug report, use the following part of the the template and delete the part at the bottom
-->
### Environment
<!-- Tell us about the environment -->
- Operating system:
- Software version:
- Software source: <!-- e.g. Operating system repository, PowerDNS repository, compiled yourself -->

### Steps to reproduce
<!-- Tell us step-by-step how the issue can be triggered. Please include your configuration files and any (Lua) scripts that are loaded. -->
1. <!-- step 1 -->
2. <!-- step 2 -->
3. <!-- step 3 -->

### Expected behaviour
<!-- What would you expect to happen when the reproduction steps are run -->

### Actual behaviour
<!-- What did happen? Please (if possible) provide logs, output from `dig` and/or tcpdump/wireshark data -->

### Other information
<!-- if you already did more digging into the issue, please provide all the information you gathered -->




<!--
Use the part below to file a feature request and delete the bug report part above.
-->
### Usecase
<!-- Tell what you're trying to achieve, without describing _what_ the requested feature should do -->

### Description
<!-- Describe as extensively as possible what you want the software to do -->
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Short description
<!-- Write a small description of what this Pull Request fixes or provides, including the issue #s -->

### Checklist
<!-- please indicate if any of these things are done/included with this Pull Request. Not all boxes need to be checked for the Pull Request to be accepted -->
I have:
- [ ] read the [CONTRIBUTING.md](https://github.com/PowerDNS/pdns/blob/master/CONTRIBUTING.md) document
- [ ] compiled and tested this code
- [ ] included documentation (including possible behaviour changes)
- [ ] documented the code
- [ ] added regression tests
- [ ] added unit tests
- [ ] <!-- when not filing this Pull Request against the master branch --> checked that this code was merged to master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ltversion.m4
lt~obsolete.m4
pdns-*.tar.gz
pdns-*.tar.bz2
regression-tests.recursor/run-auth
.*DS_Store
*~
pdns.pid
Expand Down
2 changes: 1 addition & 1 deletion build-aux/gen-version
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then
VERSION="$(git describe --match=${REL_TYPE}-* --dirty=.dirty | cut -d- -f 2-)"
else
GIT_VERSION=$(git show --no-patch --format=format:%h HEAD)
BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/-//g;')"
BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/[^[:alnum:]]//g;')"
[ "${BRANCH}" = ".master" ] && BRANCH=''
VERSION="0.0${BRANCH}.${PDNS_BUILD_NUMBER}g${GIT_VERSION}${DIRTY}"
fi
Expand Down
9 changes: 7 additions & 2 deletions build-scripts/build-auth-debian
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ PDNS_VERSION=$VERSION
export ID="${ID}"
export VERSION_ID="${VERSION_ID}"

if [ ${ID} = "ubuntu" -a ${VERSION_ID} = "14.04" ]; then
sed -i '/lib\/systemd\/system\/pdns@\?\.service/d' debian/pdns-server.install
if [ ${ID} = "ubuntu" ]; then
if [ ${VERSION_ID} = "14.04" ]; then
sed -i '/lib\/systemd\/system\/pdns@\?\.service/d' debian/pdns-server.install
fi
if [ $VERSION_ID} = "16.10" ];then
sed -i 's!libzmq-dev!libzmq3-dev!' debian/control.in
fi
fi

fakeroot debian/rules debian/control
Expand Down
39 changes: 39 additions & 0 deletions build-scripts/build-auth-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,15 @@ BuildRequires: sqlite-devel
%description backend-sqlite
This package contains the SQLite backend for %{name}
%package backend-mydns
Summary: MyDNS backend for %{name}
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
%global backends %{backends} mydns
%description backend-mydns
This package contains the MyDNS backend for %{name}
%prep
%setup -q -n %{name}-${TARBALLVERSION}
Expand Down Expand Up @@ -505,6 +514,10 @@ fi
%doc %{_defaultdocdir}/%{name}/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
%doc %{_defaultdocdir}/%{name}/dnssec-3.x_to_3.4.0_schema.sqlite3.sql
%{_libdir}/%{name}/libgsqlite3backend.so
%files backend-mydns
%doc %{_defaultdocdir}/%{name}/schema.mydns.sql
%{_libdir}/%{name}/libmydnsbackend.so
EOF
;;
CentOS\ Linux\ *\ 7*)
Expand Down Expand Up @@ -651,6 +664,15 @@ BuildRequires: tinycdb-devel
%description backend-tinydns
This package contains the TinyDNS backend for %{name}
%package backend-mydns
Summary: MyDNS backend for %{name}
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
%global backends %{backends} mydns
%description backend-mydns
This package contains the MyDNS backend for %{name}
%prep
%setup -q -n %{name}-${TARBALLVERSION}
Expand Down Expand Up @@ -806,6 +828,10 @@ exit 0
%files backend-tinydns
%{_libdir}/%{name}/libtinydnsbackend.so
%files backend-mydns
%doc modules/mydnsbackend/schema.mydns.sql
%{_libdir}/%{name}/libmydnsbackend.so
EOF
;;
SLES\ 12*)
Expand Down Expand Up @@ -913,6 +939,15 @@ BuildRequires: sqlite-devel
%description backend-sqlite
This package contains the SQLite backend for %{name}
%package backend-mydns
Summary: MyDNS backend for %{name}
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
%global backends %{backends} mydns
%description backend-mydns
This package contains the MyDNS backend for %{name}
%prep
%setup -q -n %{name}-${TARBALLVERSION}
Expand Down Expand Up @@ -1057,6 +1092,10 @@ exit 0
%doc modules/gsqlite3backend/dnssec-3.x_to_3.4.0_schema.sqlite3.sql
%doc modules/gsqlite3backend/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
%{_libdir}/%{name}/libgsqlite3backend.so
%files backend-mydns
%doc modules/mydnsbackend/schema.mydns.sql
%{_libdir}/%{name}/libmydnsbackend.so
EOF
;;
*)
Expand Down
9 changes: 5 additions & 4 deletions build-scripts/build-recursor-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Source0: ../%{name}-${TARBALLVERSION}.tar.bz2
Source1: pdns-recursor.init
Provides: powerdns-recursor = %{version}-%{release}
BuildRequires: boost-devel
BuildRequires: boost148-devel
BuildRequires: lua-devel
#BuildRequires: protobuf-devel
#BuildRequires: protobuf-compiler
Expand All @@ -144,10 +144,11 @@ package if you need a dns cache for your network.
--disable-static \
--disable-dependency-tracking \
--disable-silent-rules \
--without-protobuf \
--enable-unit-tests
--with-protobuf \
--enable-unit-tests \
--with-boost=/usr/include/boost148 LIBRARY_PATH=/usr/lib64/boost148
make %{?_smp_mflags}
make %{?_smp_mflags} LIBRARY_PATH=/usr/lib64/boost148
%install
%{__rm} -rf %{buildroot}
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/test-recursor-bulk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -x

cd regression-tests

wget -c -N http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
wget -c -N https://s3.amazonaws.com/alexa-static/top-1m.csv.zip

unzip top-1m.csv.zip

Expand Down
31 changes: 23 additions & 8 deletions build-scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ install_auth() {
run "sudo apt-get -qq --no-install-recommends install \
libzmq3-dev"

# godbc-backend
run "sudo apt-get -qq --no-install-recommends install \
libsqliteodbc"

# authoritative test requirements / setup
run "sudo apt-get -qq --no-install-recommends install \
bind9utils \
Expand All @@ -236,8 +240,8 @@ install_auth() {
jq"

run "cd .."
run "wget http://www.verisignlabs.com/dnssec-tools/packages/jdnssec-tools-0.12.tar.gz"
run "sudo tar xfz jdnssec-tools-0.12.tar.gz --strip-components=1 -C /"
run "wget https://www.verisignlabs.com/dnssec-tools/packages/jdnssec-tools-0.13.tar.gz"
run "sudo tar xfz jdnssec-tools-0.13.tar.gz --strip-components=1 -C /"
run "cd pdns"

# pkcs11 test requirements / setup
Expand Down Expand Up @@ -267,11 +271,15 @@ install_auth() {
geoip-database"

# gmysql-backend test requirements
run "sudo apt-get -qq --no-install-recommends install \
mysql-server"
# as of 2016/12/01, mysql-5.6 is now installed in the default travis image
# see https://github.com/travis-ci/travis-ci/issues/6961
#run "sudo apt-get -qq --no-install-recommends install \
# mysql-server"

# godbc-backend test setup
run echo\ -e\ "[pdns-sqlite3-1]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite3\n\n[pdns-sqlite3-2]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite32\n"\ >\ ${HOME}/.odbc.ini
run 'echo -e "[pdns-sqlite3-1]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite3\n\n[pdns-sqlite3-2]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite32\n" > ${HOME}/.odbc.ini'
run 'echo ${HOME}/.odbc.ini'
run 'cat ${HOME}/.odbc.ini'

# ldap-backend test setup
run "sudo apt-get -qq --no-install-recommends install \
Expand Down Expand Up @@ -335,12 +343,13 @@ install_recursor() {
moreutils \
jq"
run "cd .."
run "wget http://s3.amazonaws.com/alexa-static/top-1m.csv.zip"
run "wget https://s3.amazonaws.com/alexa-static/top-1m.csv.zip"
run "unzip top-1m.csv.zip -d ./pdns/regression-tests"
PDNS_SERVER_VERSION="0.0.880gcb54743-1pdns"
run "wget https://downloads.powerdns.com/autobuilt/auth/deb/$PDNS_SERVER_VERSION.trusty-amd64/pdns-server_$PDNS_SERVER_VERSION.trusty_amd64.deb"
run "wget https://downloads.powerdns.com/autobuilt/auth/deb/$PDNS_SERVER_VERSION.trusty-amd64/pdns-tools_$PDNS_SERVER_VERSION.trusty_amd64.deb"
run "sudo dpkg -i pdns-server_$PDNS_SERVER_VERSION.trusty_amd64.deb pdns-tools_$PDNS_SERVER_VERSION.trusty_amd64.deb"
run "sudo service pdns stop"
run 'for suffix in {1..40}; do sudo /sbin/ip addr add 10.0.3.$suffix/32 dev lo; done'
run "sudo touch /etc/authbind/byport/53"
run "sudo chmod 755 /etc/authbind/byport/53"
Expand All @@ -355,7 +364,7 @@ build_auth() {
run "./bootstrap"
# Build without --enable-botan1.10 option, Botan/SoftHSM conflict #2496
run "CFLAGS='-O1' CXXFLAGS='-O1' ./configure \
--with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns' \
--with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns godbc' \
--with-modules='' \
--with-sqlite3 \
--enable-libsodium \
Expand Down Expand Up @@ -431,6 +440,9 @@ test_auth() {

run "cd regression-tests"

#travis unbound is too old for this test (unbound 1.6.0 required)
run "touch tests/ent-asterisk/fail.nsec"

run "./timestamp ./start-test-stop 5300 ldap-tree"
run "./timestamp ./start-test-stop 5300 ldap-simple"
run "./timestamp ./start-test-stop 5300 ldap-strict"
Expand All @@ -454,7 +466,7 @@ test_auth() {
run "./timestamp ./start-test-stop 5300 gmysql-nsec3-narrow"

run "export GODBC_SQLITE3_DSN=pdns-sqlite3-1"
# run "./timestamp ./start-test-stop 5300 godbc_sqlite3-nsec3"
run "./timestamp ./start-test-stop 5300 godbc_sqlite3-nsec3"

run "./timestamp ./start-test-stop 5300 gpgsql-nodnssec-both"
run "./timestamp ./start-test-stop 5300 gpgsql-both"
Expand Down Expand Up @@ -482,6 +494,9 @@ test_auth() {
run "./timestamp ./start-test-stop 5300 remotebackend-zeromq-dnssec"

run "./timestamp ./start-test-stop 5300 tinydns"

run "rm tests/ent-asterisk/fail.nsec"

run "cd .."

run "cd regression-tests.rootzone"
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ AC_DEFINE([_GNU_SOURCE], [1],
# Warn when pkg.m4 is missing
m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])

PDNS_CHECK_OS

PDNS_WITH_LUAJIT
AS_IF([test "x$with_luajit" = "xno"], [
PDNS_WITH_LUA
Expand Down Expand Up @@ -131,7 +133,6 @@ AS_IF([test "x$lt_cv_dlopen" = "xno"],

AC_SUBST([LIBDL], [$lt_cv_dlopen_libs])

PDNS_CHECK_OS
PDNS_ENABLE_VERBOSE_LOGGING
PDNS_ENABLE_PKCS11
PDNS_ENABLE_GSS_TSIG
Expand Down
15 changes: 7 additions & 8 deletions contrib/ProtobufLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ def run(self):
self.printQueryMessage(msg)
elif msg.type == dnsmessage_pb2.PBDNSMessage.DNSResponseType:
self.printResponseMessage(msg)
# PR #3869
# elif msg.type == dnsmessage_pb2.PBDNSMessage.DNSOutgoingQueryType:
# self.printOutgoingQueryMessage(msg)
# elif msg.type == dnsmessage_pb2.PBDNSMessage.DNSIncomingResponseType:
# self.printIncomingResponseMessage(msg)
elif msg.type == dnsmessage_pb2.PBDNSMessage.DNSOutgoingQueryType:
self.printOutgoingQueryMessage(msg)
elif msg.type == dnsmessage_pb2.PBDNSMessage.DNSIncomingResponseType:
self.printIncomingResponseMessage(msg)
else:
print('Discarding unsupported message type %d' % (msg.type))

Expand Down Expand Up @@ -137,9 +136,9 @@ def printSummary(self, msg, typestr):

messageidstr = binascii.hexlify(bytearray(msg.messageId))
initialrequestidstr = ''
# PR #3869
# if msg.HasField('initialRequestId'):
# initialrequestidstr = ', initial uuid: ' + binascii.hexlify(bytearray(msg.initialRequestId))
if msg.HasField('initialRequestId'):
initialrequestidstr = ', initial uuid: ' + binascii.hexlify(bytearray(msg.initialRequestId))

requestorstr = ''
requestor = self.getRequestorSubnet(msg)
if requestor:
Expand Down

0 comments on commit f16cc65

Please sign in to comment.