Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2016 18:18:15 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414065 - head/dns/powerdns/files
Message-ID:  <201604261818.u3QIIFgN094778@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim (src committer)
Date: Tue Apr 26 18:18:15 2016
New Revision: 414065
URL: https://svnweb.freebsd.org/changeset/ports/414065

Log:
  During the exp-run in bug 208158, it was found that dns/powerdns gives
  errors with libc++ 3.8.0:
  
  dnspacket.cc:645:6: error: call to 'abs' is ambiguous
    if(abs(trc->d_time - now) > trc->d_fudge) {
       ^~~
  
  This is because abs() is being called with unsigned arguments.  Import
  upstream commit f2d05dd to fix it.
  
  Approved by:	tremere@cainites.net
  PR:		208725
  MFH:		2016Q2

Added:
  head/dns/powerdns/files/patch-pdns_dnspacket.cc   (contents, props changed)

Added: head/dns/powerdns/files/patch-pdns_dnspacket.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/powerdns/files/patch-pdns_dnspacket.cc	Tue Apr 26 18:18:15 2016	(r414065)
@@ -0,0 +1,15 @@
+--- pdns/dnspacket.cc.orig	2015-11-02 10:33:21 UTC
++++ pdns/dnspacket.cc
+@@ -641,9 +641,9 @@ bool checkForCorrectTSIG(const DNSPacket
+   string message;
+ 
+   q->getTSIGDetails(trc, keyname, &message);
+-  uint64_t now = time(0);
+-  if(abs(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;
++  uint64_t delta = std::abs((int64_t)trc->d_time - (int64_t)time(0));
++  if(delta > trc->d_fudge) {
++    L<<Logger::Error<<"Packet for '"<<q->qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< delta <<" > 'fudge' "<<trc->d_fudge<<endl;
+     return false;
+   }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604261818.u3QIIFgN094778>