- Update to 3.2-RC1 Changelog: http://rtfm.powerdns.com/changelog.html#changelog-auth-3-2
Responsible Changed From-To: freebsd-ports-bugs->wxs I'll take it.
State Changed From-To: open->closed I committed this with one slight change. The code does not compile with clang due to what appears to be a copy/paste problem. Would you mind submitting files/patch-pdns__dnsreplay.cc upstream?
On Tue, Dec 04, 2012 at 10:34:38PM +0100, Ralf van der Enden wrote: > > > On 04-12-2012 21:20, wxs@FreeBSD.org wrote: > > > Synopsis: > [MAINTAINER] dns/powerdns-devel: update to 3.2-RC1 > > > > > State-Changed-From-To: open->closed > > State-Changed-By: wxs > > > State-Changed-When: Tue Dec 4 20:20:41 UTC 2012 > > State-Changed-Why: > > > I committed this with one slight change. The code does not compile > with > > clang due to what appears to be a copy/paste problem. Would you > mind > > submitting files/patch-pdns__dnsreplay.cc upstream? > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=173861 [1] > > Hi there, > > I've > installed 9.1-RELEASE on my box and switched my default compiler to > clang (3.1). The bug shows up with the clang compiler that is in head. It is not caused by a bug in clang, but rather a stricter enforcement of rules compared to gcc. wxs@ack wxs % clang -v FreeBSD clang version 3.2 (branches/release_32 168974) 20121130 Target: x86_64-unknown-freebsd10.0 Thread model: posix wxs@ack wxs % > Without your suggested patch, powerdns compiles just > fine, so I think it's a bug in clang 3.0. > > The patch might actually > break stuff in dnsreplay, so I'm not sure adding it to the port is wise > just to be compatible to, IMO, a buggy clang version. The patch doesn't break anything. It removes a duplicate definition and assignment of a variable. Here is the offending chunk of code before the patch, which should make it clear that this is just a minor bug in their code. bool sendPacketFromPR(PcapPacketReader& pr, const ComboAddress& remote) { // static struct timeval lastsent; dnsheader* dh=(dnsheader*)pr.d_payload; bool sent=false; // non-recursive if((ntohs(pr.d_udp->uh_dport)!=53 && ntohs(pr.d_udp->uh_sport)!=53) || dh->rd != g_rdSelector || (unsigned int)pr.d_len <= sizeof(dnsheader)) return sent; QuestionData qd; try { dnsheader* dh=(dnsheader*)pr.d_payload; The bug is in the last line above, which is the line my patch removes. As you can see removing this line does not alter the flow of the code at all. -- WXS