]> granicus.if.org Git - pdns/commitdiff
address #2002 differently. Closes #2002.
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 26 Dec 2014 14:19:23 +0000 (15:19 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 26 Dec 2014 14:19:23 +0000 (15:19 +0100)
pdns/dnspacket.cc

index 11675553755ba2d84e1e7d2a8bf7a92ae7bb3c71..1106f7da436123b18ca996401a0faf264765b5ac 100644 (file)
@@ -594,8 +594,8 @@ bool checkForCorrectTSIG(const DNSPacket* q, DNSBackend* B, string* keyname, str
   string message;
 
   q->getTSIGDetails(trc, keyname, &message);
-  uint64_t now = time(0);
-  if(abs(trc->d_time - now) > trc->d_fudge) {
+  int64_t now = time(0);
+  if(abs((int64_t)trc->d_time - now) > trc->d_fudge) {
     L<<Logger::Error<<"Packet for '"<<q->qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< abs(trc->d_time - now)<<" > 'fudge' "<<trc->d_fudge<<endl;
     return false;
   }