svn commit: r414065 - head/dns/powerdns/files

Dimitry Andric dim at FreeBSD.org
Tue Apr 26 18:18:16 UTC 2016


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 at 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;
+   }
+ 


More information about the svn-ports-all mailing list