From: Pieter Lexis Date: Wed, 4 Apr 2018 10:42:29 +0000 (+0200) Subject: Fix review comments X-Git-Tag: dnsdist-1.3.1~50^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0983bfff33b1c6fbdcced8bc766c8774f73bd13;p=thirdparty%2Fpdns.git Fix review comments --- diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index 4f7656f600..d788217e8c 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -110,7 +110,7 @@ void DNSPacketWriter::addOpt(uint16_t udpsize, int extRCode, int Z, const vector * indicates that an unextended RCODE is in use (values 0 through 15). */ stuff.extRCode = extRCode>>4; - if (extRCode > 15) { // As this trumps the existing RCODE + if (extRCode != 0) { // As this trumps the existing RCODE getHeader()->rcode = extRCode; } diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index beaccd2f9e..eb481d2f79 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -3195,6 +3195,11 @@ static int serviceMain(int argc, char*argv[]) g_quiet=false; g_dnssecLOG=true; } + char myHostname[MAXHOSTNAMELEN]; + if (gethostname(myHostname, sizeof(myHostname)-1) == 0){ + } else { + g_log<