Changes of Revision 23
[-] | Changed | pdns.spec |
x 1
2 Patch2: %{name}-%{version}-axfr_slavedb.patch 3 Patch3: %{name}-%{version}_missing_includes.patch 4 Patch4: secfix-012012.patch 5 +Patch5: pdns-ipv6-bind.patch 6 BuildRequires: boost-devel chrpath gcc-c++ 7 Provides: powerdns = %{version}-%{release} 8 9
10 %patch2 -p0 11 %patch3 12 %patch4 -p0 13 +%patch5 -p1 14 15 %build 16 export CFLAGS="%{optflags} -DLDAP_DEPRECATED -g " 17 |
||
[+] | Added | pdns-ipv6-bind.patch ^ |
@@ -0,0 +1,43 @@ +diff -ur pdns-2.9.22.orig/pdns/nameserver.cc pdns-2.9.22.mod/pdns/nameserver.cc +--- pdns-2.9.22.orig/pdns/nameserver.cc 2008-11-15 23:32:46.000000000 +0300 ++++ pdns-2.9.22.mod/pdns/nameserver.cc 2011-06-03 14:01:41.000000000 +0400 +@@ -150,6 +150,18 @@ + + ComboAddress locala(localname, ::arg().asNum("local-port")); + ++ vector<string>locals4; ++ stringtok(locals4,::arg()["local-address"]," ,"); ++ if(! locals4.empty()) ++ { ++ L<<Logger::Error<<"Setting IPv6-only mode to "<< locala.toStringWithPort() <<endl; ++ int on = 1; ++ if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&on, sizeof(on))<0) ++ { ++ L<<Logger::Error<<"Setsockopt IPV6_V6ONLY failed"<<endl; ++ } ++ } ++ + if(::bind(s, (sockaddr*)&locala, sizeof(locala))<0) { + L<<Logger::Error<<"binding to UDP ipv6 socket: "<<strerror(errno)<<endl; + throw AhuException("Unable to bind to UDP ipv6 socket"); +Only in pdns-2.9.22.mod/pdns: patch +diff -ur pdns-2.9.22.orig/pdns/tcpreceiver.cc pdns-2.9.22.mod/pdns/tcpreceiver.cc +--- pdns-2.9.22.orig/pdns/tcpreceiver.cc 2011-06-02 13:47:54.000000000 +0400 ++++ pdns-2.9.22.mod/pdns/tcpreceiver.cc 2011-06-03 14:01:11.000000000 +0400 +@@ -564,6 +564,16 @@ + exit(1); + } + ++ if(! locals.empty()) ++ { ++ tmp=1; ++ L<<Logger::Error<<"Setting IPv6-only mode to "<< local.toStringWithPort() <<endl; ++ if(setsockopt(s,IPPROTO_IPV6, IPV6_V6ONLY,(char*)&tmp,sizeof tmp)<0) { ++ L<<Logger::Error<<"Setsockopt IPV6_V6ONLY failed"<<endl; ++ exit(1); ++ } ++ } ++ + if(bind(s, (const sockaddr*)&local, local.getSocklen())<0) { + L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl; + throw AhuException("Unable to bind to TCPv6 socket"); |