Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 26, 2013 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/5466787 to your computer and use it in GitHub Desktop.
Save Habbie/5466787 to your computer and use it in GitHub Desktop.
diff -ur pdns-3.1.20120804.2690.org/pdns/packethandler.cc pdns-3.1.20120804.2690.new/pdns/packethandler.cc
--- pdns-3.1.20120804.2690.org/pdns/packethandler.cc 2012-08-18 21:23:31.591480268 +0200
+++ pdns-3.1.20120804.2690.new/pdns/packethandler.cc 2012-08-18 21:26:07.021482782 +0200
@@ -426,7 +426,6 @@
nrc.d_set.insert(QType::DNSKEY);
DNSResourceRecord rr;
- rr.ttl = sd.default_ttl;
B.lookup(QType(QType::ANY), begin);
while(B.get(rr)) {
if(rr.domain_id == sd.domain_id)
@@ -436,7 +435,7 @@
nrc.d_next=end;
rr.qname=begin;
- // we can leave ttl untouched, either it is the default, or it is what we retrieved above
+ rr.ttl = sd.default_ttl;
rr.qtype=QType::NSEC;
rr.content=nrc.getZoneRepresentation();
rr.d_place = (mode == 5 ) ? DNSResourceRecord::ANSWER: DNSResourceRecord::AUTHORITY;
@@ -456,7 +455,6 @@
n3rc.d_algorithm = 1; // SHA1, fixed in PowerDNS for now
DNSResourceRecord rr;
- rr.ttl = sd.default_ttl;
if(!unhashed.empty()) {
B.lookup(QType(QType::ANY), unhashed);
@@ -473,7 +471,7 @@
n3rc.d_nexthash=end;
rr.qname=dotConcat(toLower(toBase32Hex(begin)), sd.qname);
-
+ rr.ttl = sd.default_ttl;
rr.qtype=QType::NSEC3;
rr.content=n3rc.getZoneRepresentation();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment