]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #7450 from omoerbeek/avoid-unaligned-access
authorRemi Gacogne <rgacogne@users.noreply.github.com>
Tue, 5 Feb 2019 15:18:32 +0000 (16:18 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Feb 2019 15:18:32 +0000 (16:18 +0100)
Avoid unaligned access, it hurts on e.g. sparc64

build-scripts/travis.sh
regression-tests/backends/gsql-common
regression-tests/backends/ldap-master
regression-tests/start-test-stop

index b2abe2370642e5a645ee2dbeceb7b2f81eaeff6f..aaae8a6787099090609bf51dc32c76cef94fd981 100755 (executable)
@@ -328,6 +328,19 @@ install_auth() {
     faketime"
   run "sudo touch /etc/authbind/byport/53"
   run "sudo chmod 755 /etc/authbind/byport/53"
+
+  # Install dnsmasq to make lookups more robust
+  run "sudo apt-get -qq --no-install-recommends install \
+    dnsmasq"
+  run 'echo listen-address=127.0.0.53 | sudo tee /etc/dnsmasq.d/local.conf'
+  run 'echo bind-interfaces | sudo tee -a /etc/dnsmasq.d/local.conf'
+
+  ## WARNING
+  ## after this dnsmasq restart, DNS lookups will fail for a few seconds.
+  run 'sudo service dnsmasq restart'
+  run "sudo resolvconf --disable-updates"
+  run 'echo nameserver 127.0.0.53 | sudo tee /etc/resolv.conf'
+  run "export RESOLVERIP=127.0.0.53"
 }
 
 install_ixfrdist() {
index af1a10f55274e64a383550e99457a9a64bfef30c..1a9e15eda033501ac335c9998e0a082d6f55c433 100644 (file)
@@ -37,7 +37,7 @@ gsql_master()
 
        $RUNWRAPPER $PDNS --daemon=no --local-address=$address --local-port=$port --config-dir=. \
                --config-name=$backend --socket-dir=./ --no-shuffle \
-               --dnsupdate=yes --resolver=8.8.8.8 --outgoing-axfr-expand-alias=yes \
+               --dnsupdate=yes --resolver=$RESOLVERIP --outgoing-axfr-expand-alias=yes \
                --expand-alias=yes \
                --cache-ttl=$cachettl --dname-processing \
                --disable-axfr-rectify=yes $lua_prequery &
index d347d11cf6cd4b204465339a07468bd4d9873a52..6f26c21f3fd89175cc9fe75e740e8c5c62c37f22 100644 (file)
@@ -28,7 +28,7 @@ __EOF__
                        --config-name=ldap --socket-dir=./ --no-shuffle \
                        --query-logging --dnsupdate=yes \
       --expand-alias=yes --outgoing-axfr-expand-alias=yes \
-      --resolver=8.8.8.8 \
+      --resolver=$RESOLVERIP \
                        --cache-ttl=$cachettl --dname-processing $lua_prequery &
 
                skipreasons="nodnssec noent nodyndns nometa noaxfr"
index ea99f91b8819e22ada29c4beed39e457e5e88bfd..9eff25648c1f43b1f734a4dfe9b867b3fba13118 100755 (executable)
@@ -16,6 +16,7 @@ export ZONE2SQL=${ZONE2SQL:-${PWD}/../pdns/zone2sql}
 export ZONE2LDAP=${ZONE2LDAP:-${PWD}/../pdns/zone2ldap}
 export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
 export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control}
+export RESOLVERIP=${RESOLVERIP:-8.8.8.8}
 
 
 ALGORITHM=${ALGORITHM:="hmac-md5"}