From f2d05dd430abdb4e630387275af0bd5477eef71b Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 22 Nov 2015 23:19:20 +0100 Subject: [PATCH] Fix signed/unsigned type confusion warnings in checkForCorrectTSIG --- pdns/dnspacket.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index 7a21eebff..1c330446a 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -656,9 +656,9 @@ bool checkForCorrectTSIG(const DNSPacket* q, UeberBackend* B, DNSName* keyname, string message; q->getTSIGDetails(trc, keyname, &message); - int64_t now = time(0); - if(abs((int64_t)trc->d_time - now) > trc->d_fudge) { - L<qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< abs(trc->d_time - now)<<" > 'fudge' "<d_fudge<d_time - (int64_t)time(0)); + if(delta > trc->d_fudge) { + L<qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< delta <<" > 'fudge' "<d_fudge<