Bug 173861 - [MAINTAINER] dns/powerdns-devel: update to 3.2-RC1
Summary: [MAINTAINER] dns/powerdns-devel: update to 3.2-RC1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 15:00 UTC by Ralf van der Enden
Modified: 2012-12-04 22:00 UTC (History)
0 users

See Also:


Attachments
powerdns-devel.diff (3.35 KB, patch)
2012-11-23 15:00 UTC, Ralf van der Enden
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf van der Enden 2012-11-23 15:00:00 UTC
	
- Update to 3.2-RC1

Changelog: http://rtfm.powerdns.com/changelog.html#changelog-auth-3-2
Comment 1 Wesley Shields freebsd_committer 2012-11-29 16:35:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 2 Wesley Shields freebsd_committer 2012-12-04 20:20:41 UTC
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?
Comment 3 Wesley Shields freebsd_committer 2012-12-04 21:58:10 UTC
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