From mark@tilia.nedworks.org Sat Feb 22 19:04:01 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from tilia.nedworks.org (tilia.nedworks.org [213.193.225.136]) by spoon.powerdns.com (Postfix) with ESMTP id 628C519D2A for ; Sat, 22 Feb 2003 19:04:01 +0100 (CET) Received: from mark by tilia.nedworks.org with local (Exim 4.12) id 18lvNO-0003B1-00 for pdns-dev@mailman.powerdns.com; Thu, 20 Feb 2003 19:24:54 +0100 Date: Thu, 20 Feb 2003 19:24:54 +0100 From: mark@nedworks.org To: pdns-dev@mailman.powerdns.com Message-ID: <20030220182454.GB12085@tilia.nedworks.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: Mark Bergsma Subject: [Pdns-dev] query-local-address configuration option (patch included) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2003 18:04:01 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Although pdns does have support for IP aliases through configuration options for binding listening sockets to specific IPs, it always uses INADDR_ANY for sending queries and AXFR requests (so it lets the OS decide which IP address to use). This was causing me problems, because pdns isn't listening on my 'main' ip on one of my boxes. The OS would choose it's main IP for sending notifies etc. to my masters/slaves, which did not recognize the notifies as coming from my server. There are some ways to circumvent this behaviour, but I figured that being able to specify a source IP address for queries in pdns would be the best solution to this problem. The patch attached to this message does exactly that. It adds a 'query-local-source' configuration option that accepts a single IP address or hostname, which would then be used for both udp and tcp queries (notifies, AXFRs...). I did a few quick tests and it seems to work fine. No guarantees, though ;) -- Mark --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdns-query-local-address.diff" diff -ur pdns-2.9.6/pdns/common_startup.cc pdns-2.9.6-mark1/pdns/common_startup.cc --- pdns-2.9.6/pdns/common_startup.cc Mon Jan 20 14:09:42 2003 +++ pdns-2.9.6-mark1/pdns/common_startup.cc Thu Feb 20 18:44:16 2003 @@ -46,6 +46,7 @@ arg().set("smtpredirector","Our smtpredir MX host")="a.misconfigured.powerdns.smtp.server"; arg().set("local-address","Local IP address to which we bind")="0.0.0.0"; arg().set("local-ipv6","Local IP address to which we bind")=""; + arg().set("query-local-address","Source IP address for sending queries")=""; arg().set("max-queue-length","Maximum queuelength before considering situation lost")="5000"; arg().set("soa-serial-offset","Make sure that no SOA serial is less than this number")="0"; arg().set("only-soa","Make sure that no SOA serial is less than this number")="org"; diff -ur pdns-2.9.6/pdns/communicator.cc pdns-2.9.6-mark1/pdns/communicator.cc --- pdns-2.9.6/pdns/communicator.cc Mon Feb 10 14:36:10 2003 +++ pdns-2.9.6-mark1/pdns/communicator.cc Thu Feb 20 18:44:16 2003 @@ -345,7 +345,25 @@ memset((char *)&sin,0, sizeof(sin)); sin.sin_family = AF_INET; - sin.sin_addr.s_addr = INADDR_ANY; + + // Bind to a specific IP (query-local-address) if specified + string querylocaladdress(arg()["query-local-address"]); + if (querylocaladdress=="") { + sin.sin_addr.s_addr = INADDR_ANY; + } + else + { + struct hostent *h=0; + h=gethostbyname(querylocaladdress.c_str()); + if(!h) { + Utility::closesocket(d_nsock); + d_nsock=-1; + throw AhuException("Unable to resolve query local address"); + } + + sin.sin_addr.s_addr = *(int*)h->h_addr; + } + int n=0; for(;n<10;n++) { sin.sin_port = htons(10000+(Utility::random()%50000)); @@ -356,7 +374,7 @@ if(n==10) { Utility::closesocket(d_nsock); d_nsock=-1; - throw AhuException(string("binding dnsproxy socket: ")+strerror(errno)); + throw AhuException(string("binding notify socket: ")+strerror(errno)); } if( !Utility::setNonBlocking( d_nsock )) throw AhuException(string("error getting or setting notify socket non-blocking: ")+strerror(errno)); diff -ur pdns-2.9.6/pdns/resolver.cc pdns-2.9.6-mark1/pdns/resolver.cc --- pdns-2.9.6/pdns/resolver.cc Tue Feb 11 08:55:33 2003 +++ pdns-2.9.6-mark1/pdns/resolver.cc Thu Feb 20 18:44:16 2003 @@ -216,7 +216,37 @@ d_sock=socket(AF_INET,SOCK_STREAM,0); if(d_sock<0) throw ResolverException("Unable to make a TCP socket for resolver: "+stringerror()); - + + // Use query-local-address as source IP for queries, if specified. + string querylocaladdress(arg()["query-local-address"]); + if (querylocaladdress!="") { + struct sockaddr_in fromaddr; + struct hostent *h=0; + + h = gethostbyname(querylocaladdress.c_str()); + if(!h) { + Utility::closesocket(d_sock); + d_sock=-1; + throw ResolverException("Unable to resolve query local address"); + } + + fromaddr.sin_family = AF_INET; + fromaddr.sin_addr.s_addr = *(int*)h->h_addr; + + // Find a random free port + int n=0; + for(;n<10;n++) { + fromaddr.sin_port = htons(10000+(Utility::random()%50000)); + if(bind(d_sock, (struct sockaddr *)&fromaddr, sizeof(fromaddr)) >= 0) + break; + } + if(n==10) { + Utility::closesocket(d_sock); + d_sock=-1; + throw ResolverException("Binding to query-local-address: "+stringerror()); + } + } + Utility::setNonBlocking( d_sock ); int err; --PNTmBPCT7hxwcZjr-- From trancer@trancer.nl Sun Feb 23 22:43:27 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from server01.sjeemz.customer.isp-services.nl (server01.sjeemz.nl [212.79.237.153]) by spoon.powerdns.com (Postfix) with ESMTP id 1206E187E7 for ; Sun, 23 Feb 2003 22:43:27 +0100 (CET) Received: from lithium (d128233.upc-d.chello.nl [213.46.128.233]) by server01.sjeemz.customer.isp-services.nl (Postfix) with ESMTP id ABB5D23CF6; Sun, 23 Feb 2003 22:43:24 +0100 (CET) From: "Roeland Nieuwenhuis" To: Date: Sun, 23 Feb 2003 22:43:23 +0100 Message-ID: <000001c2db84$9ad372f0$0200a8c0@lithium> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C2DB8C.FC9AE830" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: trancer@poweradmin.org Subject: [Pdns-dev] Zone2SQL error X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2003 21:43:27 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C2DB8C.FC9AE830 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, There is a small error or at least inconsistent thing with the manual in zone2sql. Zone2sql takes the SOA record from a a bind file, reads it, and leaves in the last dots of the primary and hostmaster field. According to the manual they shouldnt be there, and since no records in PDNS are using these dots this might be somehow confusing. Example: $ORIGIN trancer.nl. $TTL 86400 @ IN SOA ns1.example.nl. hostermaster.example.nl. ( 2003020301 ; serial 28800 ; refresh 7200 ; retry 604800 ; expire 86400 ; minimum TTL ) Is converted to this using zone2sql --gmysql: insert into records (domain_id, name,type,content,ttl,prio) select id ,'trancer.nl', 'SOA', 'ns1.example.nl. hostermaster.example.nl. 2003020301 28800 7200 604800 86400', 86400, 0 from domains where name='trancer.nl'; Mind the dots behind ns1.example.nl and hostmaster.example.nl, these shouldnt be here according to http://rtfm.powerdns.com/types.html Regards, Roeland Nieuwenhuis -- We are the music makers, we are the movers and the shakers http://www.poweradmin.org - The PowerDNS Frontend http://www.zeekoe.nl - vague yada yada ------=_NextPart_000_0001_01C2DB8C.FC9AE830 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zone2SQL error

Hi,

There is a small error or at least = inconsistent thing with the manual in zone2sql.
Zone2sql takes the SOA record from a a = bind file, reads it, and leaves in the last dots of the primary and = hostmaster field. According to the manual they shouldnt be there, and = since no records in PDNS are using these dots this might be somehow = confusing. Example:

$ORIGIN trancer.nl.
$TTL 86400
@         &nb= sp;           &nbs= p;            = ;     IN      = SOA           &nbs= p; ns1.example.nl. = hostermaster.example.nl.        = (
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     2003020301      ; = serial
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     = 28800           ; = refresh
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     = 7200            ; = retry
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     = 604800          ; = expire
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;     = 86400           ; = minimum TTL
         &nbs= p;            = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;            =              = )

Is converted to this using zone2sql = --gmysql:

insert into records (domain_id, = name,type,content,ttl,prio) select id ,'trancer.nl', 'SOA', = 'ns1.example.nl. hostermaster.example.nl. 2003020301 28800 7200 604800 = 86400', 86400, 0 from domains where name=3D'trancer.nl';

Mind the dots behind ns1.example.nl and = hostmaster.example.nl, these shouldnt be here according to http://rtfm.powerdns.com/types.html

Regards,

Roeland Nieuwenhuis
--
We are the music = makers, we are the movers and the shakers
http://www.poweradmin.org - The PowerDNS = Frontend
http://www.zeekoe.nl - vague yada = yada

------=_NextPart_000_0001_01C2DB8C.FC9AE830-- From mark@tilia.nedworks.org Mon Feb 24 14:23:01 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from tilia.nedworks.org (tilia.nedworks.org [213.193.225.136]) by spoon.powerdns.com (Postfix) with ESMTP id 2F1251818A for ; Mon, 24 Feb 2003 14:23:01 +0100 (CET) Received: from mark by tilia.nedworks.org with local (Exim 4.12) id 18nIZR-000195-00 for pdns-dev@mailman.powerdns.com; Mon, 24 Feb 2003 14:23:01 +0100 Date: Mon, 24 Feb 2003 14:23:01 +0100 From: mark@nedworks.org To: pdns-dev@mailman.powerdns.com Subject: Re: [Pdns-dev] query-local-address configuration option (patch included) Message-ID: <20030224132301.GA4202@tilia.nedworks.org> References: <20030220182454.GB12085@tilia.nedworks.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <20030220182454.GB12085@tilia.nedworks.org> User-Agent: Mutt/1.3.28i Sender: Mark Bergsma X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2003 13:23:01 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline As Bert pointed out on IRC, a bind() with sin_port set to 0 will allocate a free local port itself, so there is no need to search for a random free local port in pdns. Updated patch included. -- Mark --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdns-query-local-address2.diff" diff -ur pdns-2.9.6/pdns/common_startup.cc pdns-2.9.6-mark2/pdns/common_startup.cc --- pdns-2.9.6/pdns/common_startup.cc Mon Jan 20 14:09:42 2003 +++ pdns-2.9.6-mark2/pdns/common_startup.cc Mon Feb 24 14:06:52 2003 @@ -46,6 +46,7 @@ arg().set("smtpredirector","Our smtpredir MX host")="a.misconfigured.powerdns.smtp.server"; arg().set("local-address","Local IP address to which we bind")="0.0.0.0"; arg().set("local-ipv6","Local IP address to which we bind")=""; + arg().set("query-local-address","Source IP address for sending queries")=""; arg().set("max-queue-length","Maximum queuelength before considering situation lost")="5000"; arg().set("soa-serial-offset","Make sure that no SOA serial is less than this number")="0"; arg().set("only-soa","Make sure that no SOA serial is less than this number")="org"; diff -ur pdns-2.9.6/pdns/communicator.cc pdns-2.9.6-mark2/pdns/communicator.cc --- pdns-2.9.6/pdns/communicator.cc Mon Feb 10 14:36:10 2003 +++ pdns-2.9.6-mark2/pdns/communicator.cc Mon Feb 24 14:07:12 2003 @@ -345,7 +345,25 @@ memset((char *)&sin,0, sizeof(sin)); sin.sin_family = AF_INET; - sin.sin_addr.s_addr = INADDR_ANY; + + // Bind to a specific IP (query-local-address) if specified + string querylocaladdress(arg()["query-local-address"]); + if (querylocaladdress=="") { + sin.sin_addr.s_addr = INADDR_ANY; + } + else + { + struct hostent *h=0; + h=gethostbyname(querylocaladdress.c_str()); + if(!h) { + Utility::closesocket(d_nsock); + d_nsock=-1; + throw AhuException("Unable to resolve query local address"); + } + + sin.sin_addr.s_addr = *(int*)h->h_addr; + } + int n=0; for(;n<10;n++) { sin.sin_port = htons(10000+(Utility::random()%50000)); @@ -356,7 +374,7 @@ if(n==10) { Utility::closesocket(d_nsock); d_nsock=-1; - throw AhuException(string("binding dnsproxy socket: ")+strerror(errno)); + throw AhuException(string("binding notify socket: ")+strerror(errno)); } if( !Utility::setNonBlocking( d_nsock )) throw AhuException(string("error getting or setting notify socket non-blocking: ")+strerror(errno)); diff -ur pdns-2.9.6/pdns/resolver.cc pdns-2.9.6-mark2/pdns/resolver.cc --- pdns-2.9.6/pdns/resolver.cc Tue Feb 11 08:55:33 2003 +++ pdns-2.9.6-mark2/pdns/resolver.cc Mon Feb 24 14:07:38 2003 @@ -216,7 +216,31 @@ d_sock=socket(AF_INET,SOCK_STREAM,0); if(d_sock<0) throw ResolverException("Unable to make a TCP socket for resolver: "+stringerror()); - + + // Use query-local-address as source IP for queries, if specified. + string querylocaladdress(arg()["query-local-address"]); + if (querylocaladdress!="") { + struct sockaddr_in fromaddr; + struct hostent *h=0; + + h = gethostbyname(querylocaladdress.c_str()); + if(!h) { + Utility::closesocket(d_sock); + d_sock=-1; + throw ResolverException("Unable to resolve query local address"); + } + + fromaddr.sin_family = AF_INET; + fromaddr.sin_addr.s_addr = *(int*)h->h_addr; + fromaddr.sin_port = 0; + + if (bind(d_sock, (struct sockaddr *)&fromaddr, sizeof(fromaddr)) < 0) { + Utility::closesocket(d_sock); + d_sock=-1; + throw ResolverException("Binding to query-local-address: "+stringerror()); + } + } + Utility::setNonBlocking( d_sock ); int err; --CE+1k2dSO48ffgeK-- From ahu@outpost.ds9a.nl Tue Feb 25 13:37:03 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 72F78182B5 for ; Tue, 25 Feb 2003 13:37:03 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 6255144F7; Tue, 25 Feb 2003 13:37:03 +0100 (CET) Date: Tue, 25 Feb 2003 13:37:03 +0100 From: bert hubert To: Roeland Nieuwenhuis Subject: Re: [Pdns-dev] Zone2SQL error Message-ID: <20030225123703.GA10403@outpost.ds9a.nl> References: <000001c2db84$9ad372f0$0200a8c0@lithium> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001c2db84$9ad372f0$0200a8c0@lithium> User-Agent: Mutt/1.3.28i cc: trancer@poweradmin.org cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2003 12:37:03 -0000 On Sun, Feb 23, 2003 at 10:43:23PM +0100, Roeland Nieuwenhuis wrote: > Zone2sql takes the SOA record from a a bind file, reads it, and leaves > in the last dots of the primary and hostmaster field. According to the > manual they shouldnt be there, and since no records in PDNS are using > these dots this might be somehow confusing. Example: Fixed in my tree & cvs, thanks! Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO http://netherlabs.nl Consulting From remco@pipsworld.nl Fri Feb 28 11:43:10 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from mta.sara.nl (mta.sara.nl [145.100.16.144]) by spoon.powerdns.com (Postfix) with ESMTP id E945318361 for ; Fri, 28 Feb 2003 11:43:09 +0100 (CET) Received: from buffy (buffy.sara.nl [145.100.25.81]) by mta.sara.nl (8.11.3/8.11.3) with SMTP id h1SAh9a09224 for ; Fri, 28 Feb 2003 11:43:09 +0100 (MET) Date: Fri, 28 Feb 2003 11:43:04 +0100 From: Remco Post To: pdns-dev@mailman.powerdns.com Message-Id: <20030228114304.10e0ecad.remco@pipsworld.nl> X-Mailer: Sylpheed version 0.8.6 (GTK+ 1.2.10; sparc-sun-solaris2.7) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Pdns-dev] various problems X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2003 10:43:10 -0000 Hi all, I'm trying to compile pdns 2.9.6 on solaris. Getting close, but found some small glitches: 1- ldapbackend user u_int16_t, that is not defined on solaris, uint16_t is... 2- gpgsql adds -Wl,-rpath to the linker config... this breaks on solaris, gcc on solaris (usually) user the solaris ld, which doesn't undestand these gnu-isms -- Met vriendelijke groeten, Remco Post SARA - Stichting Academisch Rekencentrum Amsterdam http://www.sara.nl High Performance Computing Tel. +31 20 592 8008 Fax. +31 20 668 3167 "I really didn't foresee the Internet. But then, neither did the computer industry. Not that that tells us very much of course - the computer industry didn't even foresee that the century was going to end." -- Douglas Adams From mark@nedworks.org Wed Mar 5 01:02:31 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from tilia.nedworks.org (tilia.nedworks.org [213.193.225.136]) by spoon.powerdns.com (Postfix) with ESMTP id 1BD801857D for ; Wed, 5 Mar 2003 01:02:31 +0100 (CET) Received: from mark by tilia.nedworks.org with local (Exim 4.12) id 18qMMg-0008Q0-00 for pdns-dev@mailman.powerdns.com; Wed, 05 Mar 2003 01:02:30 +0100 Date: Wed, 5 Mar 2003 01:02:30 +0100 From: mark@nedworks.org To: pdns-dev@mailman.powerdns.com Message-ID: <20030305000230.GA32038@tilia.nedworks.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: Mark Bergsma Subject: [Pdns-dev] Parse error IP logging bug (patch included) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2003 00:02:31 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline While investigating an issue with AXFRs from a Solaris pdns client, we discovered that pdns would log totally bogus IPs on the server: pdns[25322]: Ignoring packet: too short from 7c6e:7330:2e6e:6564:776f:726b:732e:6f72 It appeared that the 'remote' field in the dnspacket class was not being initialized until *after* the parsing of the dnspacket in method parse(), which logs the log line above. Fix included. -- Mark --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdns-getRemote-log-bug.diff" --- pdns-2.9.6/pdns/tcpreceiver.cc Wed Feb 5 14:44:23 2003 +++ pdns-2.9.6-mark2/pdns/tcpreceiver.cc Wed Mar 5 00:34:45 2003 @@ -157,11 +157,11 @@ S.inc("tcp-queries"); DNSPacket *packet=new DNSPacket; - if(packet->parse(mesg, pktlen)<0) - break; - packet->setRemote((struct sockaddr *)&remote,sizeof(remote)); + if(packet->parse(mesg, pktlen)<0) + break; + if(packet->qtype.getCode()==QType::AXFR) { if(doAXFR(packet->qdomain, packet, fd)) S.inc("tcp-answers"); --3V7upXqbjpZ4EhLz-- From ahu@outpost.ds9a.nl Wed Mar 5 12:08:39 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 487F7186F8 for ; Wed, 5 Mar 2003 12:08:39 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 35A553FDC; Wed, 5 Mar 2003 12:08:39 +0100 (CET) Date: Wed, 5 Mar 2003 12:08:39 +0100 From: bert hubert To: mark@nedworks.org Subject: Re: [Pdns-dev] Parse error IP logging bug (patch included) Message-ID: <20030305110839.GD21073@outpost.ds9a.nl> References: <20030305000230.GA32038@tilia.nedworks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030305000230.GA32038@tilia.nedworks.org> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2003 11:08:39 -0000 On Wed, Mar 05, 2003 at 01:02:30AM +0100, mark@nedworks.org wrote: > While investigating an issue with AXFRs from a Solaris pdns client, > we discovered that pdns would log totally bogus IPs on the server: > > pdns[25322]: Ignoring packet: too short from 7c6e:7330:2e6e:6564:776f:726b:732e:6f72 Thanks, applied! Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO http://netherlabs.nl Consulting From jltallon@adv-solutions.net Wed Mar 5 15:16:21 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from quark.amimatica.com (quark.amimatica.com [213.139.24.154]) by spoon.powerdns.com (Postfix) with ESMTP id E57A81831E for ; Wed, 5 Mar 2003 15:16:20 +0100 (CET) Received: from asteroid.adv-solutions.net (net.adv-solutions.net [62.93.161.109]) by quark.amimatica.com (Postfix) with ESMTP id C98BB814E for ; Wed, 5 Mar 2003 15:15:44 +0100 (CET) Message-Id: <5.2.0.9.0.20030305150547.00b3e410@mail.adv-solutions.net> X-Sender: jltallon@adv-solutions.net@mail.adv-solutions.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 05 Mar 2003 15:15:00 +0100 To: pdns-dev@mailman.powerdns.com From: =?iso-8859-1?Q?Jos=E9?= Luis =?iso-8859-1?Q?Tall=F3n?= Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable Subject: [Pdns-dev] Automatic serial increment for SOA records X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2003 14:16:21 -0000 I would love to have auto-incrementing serials for SOAs in PowerDNS --=20 working, that is ;) I took a look at the code and everything seems to be perfectly well=20 thought-of and coded ( this is an open compliment, Bert ;) ) however, i read on the -user list it didn't work and, according to my own=20 tests, it doesn't, indeed. I'm using MySQL on Linux ( Debian 3.0 with latest updates plus=20 PowerDNS+dependencies from 'unstable' ), with InnoDB backend for=20 transaction aware tables. Does it work with Postgres? Sybase? maybe ODBC on= =20 Windows? something? If all answers are negative... Shall I get GDB on it and start debugging? (= =20 dunno if MTasker might get any side-effects from debugging or whatever ) Any tips before i get completely insane trying to debug? ;) TIA Regards, Jos=E9 Luis Tall=F3n From nikolajn@ascio.com Wed Mar 5 15:27:59 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from cph1snms2.mail.ascio.net (smtp3.mail.ascio.net [213.237.145.157]) by spoon.powerdns.com (Postfix) with ESMTP id 7D9C3184A0 for ; Wed, 5 Mar 2003 15:27:59 +0100 (CET) Received: from aries.dk.speednames.com (aries.dk.speednames.com [213.237.145.56]) by cph1snms2.mail.ascio.net (Postfix) with ESMTP id 7A03CEB97A; Wed, 5 Mar 2003 14:30:56 +0000 (GMT) Received: by aries.dk.speednames.com with Internet Mail Service (5.5.2655.55) id ; Wed, 5 Mar 2003 15:27:59 +0100 Message-ID: <2F15A97500CFA0469C9BACC2041F8AC702EE0C04@aries.dk.speednames.com> From: Nikolaj Nyholm To: =?iso-8859-1?Q?=27Jos=E9_Luis_Tall=F3n=27?= , "'pdns-dev@mailman.powerdns.com'" Subject: RE: [Pdns-dev] Automatic serial increment for SOA records Date: Wed, 5 Mar 2003 15:27:58 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.55) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable cc: "Martin D. Nielsen" X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2003 14:27:59 -0000 we had the same issue and found the error.=20 i'll ask martin, the developer who solved it, to post it as soon as he = is back at his machine. (sorry for not posting the solution to the list.) /n > -----Original Message----- > From: Jos=E9 Luis Tall=F3n [mailto:jltallon@adv-solutions.net]=20 > Sent: 5. marts 2003 15:15 > To: pdns-dev@mailman.powerdns.com > Subject: [Pdns-dev] Automatic serial increment for SOA records >=20 >=20 > I would love to have auto-incrementing serials for SOAs in=20 > PowerDNS --=20 > working, that is ;) >=20 > I took a look at the code and everything seems to be perfectly well=20 > thought-of and coded ( this is an open compliment, Bert ;) ) > however, i read on the -user list it didn't work and,=20 > according to my own=20 > tests, it doesn't, indeed. >=20 > I'm using MySQL on Linux ( Debian 3.0 with latest updates plus=20 > PowerDNS+dependencies from 'unstable' ), with InnoDB backend for=20 > transaction aware tables. Does it work with Postgres? Sybase?=20 > maybe ODBC on=20 > Windows? something? >=20 >=20 > If all answers are negative... Shall I get GDB on it and=20 > start debugging? (=20 > dunno if MTasker might get any side-effects from debugging or=20 > whatever ) > Any tips before i get completely insane trying to debug? ;) >=20 >=20 > TIA >=20 > Regards, > Jos=E9 Luis Tall=F3n >=20 > _______________________________________________ > Pdns-dev mailing list > Pdns-dev@mailman.powerdns.com > http://mailman.powerdns.com/mailman/listinfo/pdns-dev >=20 From davidu@everydns.net Mon Mar 17 00:02:39 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from mail.everydns.net (www.everydns.net [209.75.39.140]) by spoon.powerdns.com (Postfix) with SMTP id E8A7D199DD for ; Mon, 17 Mar 2003 00:02:38 +0100 (CET) Received: (qmail 3622 invoked by uid 516); 16 Mar 2003 23:02:44 -0000 Received: from davidu@everydns.net by everydns.net with qmail-scanner-1.03 (. Clean. Processed in 0.105864 secs); 16 Mar 2003 23:02:44 -0000 Received: from localhost (HELO mail.everydns.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2003 23:02:43 -0000 Received: from 185rts38.wuh.wustl.edu ([128.252.185.38]) (SquirrelMail authenticated user davidu@everydns.net) by mail.everydns.net with HTTP; Sun, 16 Mar 2003 15:02:43 -0800 (PST) Message-ID: <45854.128.252.185.38.1047855763.squirrel@mail.everydns.net> Date: Sun, 16 Mar 2003 15:02:43 -0800 (PST) From: davidu@everydns.net To: pdns-dev@mailman.powerdns.com User-Agent: SquirrelMail/1.4.0 [CVS-DEVEL] MIME-Version: 1.0 Content-Type: multipart/mixed;charset=iso-8859-1; boundary="----=_20030316150243_90560" X-Priority: 3 Importance: Normal Subject: [Pdns-dev] Preliminary ACL support in PowerDNS (AXFR for now) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2003 23:02:40 -0000 ------=_20030316150243_90560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hi, With the help of Bert Hubert I was able to get a basic ACL system working in PowerDNS today. The current system been tested using the gpgsql backend but the other sql backends should be trivial to add support for. Attached is the patch which relies on a table in pgsql called "acls" with the structure of: CREATE TABLE "acls" ( "acl_id" int NOT NULL, "acl_type" varchar(32) NOT NULL, "key" varchar(250) NOT NULL, "value" varchar(255) NOT NULL, CONSTRAINT "acls_pkey" PRIMARY KEY ("acl_id") ); An example ACL could be: INSERT INTO "acls" ("acl_id", "acl_type", "key", "value") VALUES (1, 'allow-axfr', 'example.com', '127.0.0.2'); To allow an AXFR of example.com FROM 127.0.0.2 The acl_type field allows this ACL system to be used for other purposes besides just axfr. The system has not been tested with anything besides AXFR however. This should patch into current CVS just fine. Please share comments and questions. (One nice addition might be to add support for netmasks) The patch can also be found at http://katie.everybox.com/~davidu/pdns_acls.diff -davidu ------=_20030316150243_90560 Content-Type: application/octet-stream; name="pdns_acls.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="pdns_acls.diff" SW5kZXg6IG1vZHVsZXMvZ3Bnc3FsYmFja2VuZC9ncGdzcWxiYWNrZW5kLmNjCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K UkNTIGZpbGU6IC92YXIvY3Zzcm9vdC9wZG5zL21vZHVsZXMvZ3Bnc3FsYmFja2VuZC9ncGdzcWxi YWNrZW5kLmNjLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjIKZGlmZiAtdSAtcCAtcjEuMiBncGdz cWxiYWNrZW5kLmNjCi0tLSBtb2R1bGVzL2dwZ3NxbGJhY2tlbmQvZ3Bnc3FsYmFja2VuZC5jYwky IEphbiAyMDAzIDE1OjQzOjAwIC0wMDAwCTEuMgorKysgbW9kdWxlcy9ncGdzcWxiYWNrZW5kL2dw Z3NxbGJhY2tlbmQuY2MJMTYgTWFyIDIwMDMgMjI6NDI6MzcgLTAwMDAKQEAgLTczLDYgKzczLDcg QEAgcHVibGljOgogICAgIGRlY2xhcmUoc3VmZml4LCJ1cGRhdGUtbGFzdGNoZWNrLXF1ZXJ5Iiwi IiwgInVwZGF0ZSBkb21haW5zIHNldCBsYXN0X2NoZWNrPSVkIHdoZXJlIGlkPSVkIik7CiAgICAg ZGVjbGFyZShzdWZmaXgsImluZm8tYWxsLW1hc3Rlci1xdWVyeSIsIiIsICJzZWxlY3QgaWQsbmFt ZSxtYXN0ZXIsbGFzdF9jaGVjayxub3RpZmllZF9zZXJpYWwsdHlwZSBmcm9tIGRvbWFpbnMgd2hl cmUgdHlwZT0nTUFTVEVSJyIpOwogICAgIGRlY2xhcmUoc3VmZml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CBzZXRGcmVzaCh1X2ludDMyX3QgZG9tYWluX2lkKTsKICAgdm9pZCBnZXRVbmZyZXNoU2xh dmVJbmZvcyh2ZWN0b3I8RG9tYWluSW5mbz4gKmRvbWFpbnMpOwogICB2b2lkIGdldFVwZGF0ZWRN YXN0ZXJzKHZlY3RvcjxEb21haW5JbmZvPiAqdXBkYXRlZERvbWFpbnMpOwpAQCAtNjYsNSArNjcs NiBAQCBwcml2YXRlOgogICBzdHJpbmcgZF9VcGRhdGVMYXN0Q2hlY2tvZlpvbmVRdWVyeTsKICAg c3RyaW5nIGRfSW5mb09mQWxsTWFzdGVyRG9tYWluc1F1ZXJ5OwogICBzdHJpbmcgZF9EZWxldGVa b25lUXVlcnk7CQkKKyAgc3RyaW5nIGRfQ2hlY2tBQ0xRdWVyeTsKIAogfTsK ------=_20030316150243_90560-- From ahu@outpost.ds9a.nl Sat Apr 12 11:17:23 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 8C46B18206 for ; Sat, 12 Apr 2003 11:17:23 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 47BE444DF; Sat, 12 Apr 2003 11:17:23 +0200 (CEST) Date: Sat, 12 Apr 2003 11:17:23 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030412091723.GB26029@outpost.ds9a.nl> References: <200304120054.53560.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304120054.53560.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: ldap backend patch X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 09:17:23 -0000 On Sat, Apr 12, 2003 at 12:54:51AM +0200, Norbert Sendetzky wrote: > Changes are: > - - New option to enable the possibility of reverse lookup delegation > - - Bugfix for preventing crashes due to missing exception handling > - - GPL Statement (legal clarification) Thanks, applied. > At last, one little question: Why did you include in > ldapbackend.cc? It's already included in ldapbackend.hh. Not entirely sure - I make mistakes too. I also added a pointer in the docs to your powerdns-ldap page. Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From jltallon@adv-solutions.net Sat Apr 12 16:07:45 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from quark.amimatica.com (quark.amimatica.com [213.139.24.154]) by spoon.powerdns.com (Postfix) with ESMTP id F084718B48 for ; Sat, 12 Apr 2003 16:07:44 +0200 (CEST) Received: from asteroid.adv-solutions.net (net.adv-solutions.net [62.93.161.109]) by quark.amimatica.com (Postfix) with ESMTP id E89F880F3 for ; Sat, 12 Apr 2003 16:07:10 +0200 (CEST) Message-Id: <5.2.0.9.0.20030412155947.035836e8@mail.adv-solutions.net> X-Sender: jltallon@adv-solutions.net@mail.adv-solutions.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Sat, 12 Apr 2003 16:06:43 +0200 To: pdns-dev@mailman.powerdns.com From: =?iso-8859-1?Q?Jos=E9?= Luis =?iso-8859-1?Q?Tall=F3n?= Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: [Pdns-dev] Auto-incrementing serial with SQL backends X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 14:07:45 -0000 Two or three months ago I asked about the auto-increment feature with generic-sql backends, which is not working. The only answer pointed to a workaround, instead of a fix. I took a look at the code, at everything looked fine. Bert, do you have any idea where the bug is? I can spend a little time working on it next week --Easter vacation--, so i will try to fix it [quite annoying we don't have it working despite documentation] I know PowerDNS is multi-threaded (of course!) -- any special measures i should take when debugging? Thanks for a well-done nameserver. Keep the good work! Regards, J.L. From norbert@linuxnetworks.de Sat Jun 21 18:02:52 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id E0DC417F99 for ; Sat, 21 Jun 2003 18:02:51 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0378.pppool.de [213.7.3.120]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5LG2mJT005241; Sat, 21 Jun 2003 18:02:49 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-15" From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 21 Jun 2003 16:45:46 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306211645.48381.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] AXFR check X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2003 16:02:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The current check for allowing AXFR in tcpreceiver.cc line 249 is: if(!arg().mustDo("disable-axfr") || !arg()["allow-axfr-ips"].empty()) return true; IMHO it should be: if(!arg().mustDo("disable-axfr") return false; if(arg()["allow-axfr-ips"].empty()) return true; Otherwise AXFR is allowed even if disable-axfr=3Dyes. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+9G+axMLs5v5/7eARAofjAJ0SxLGI7D95dpftudhTUClVefb9+ACfVRj3 zvZr9mSifuSFulznRq30EfY=3D =3DR8Rl -----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sat Jun 21 18:02:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 9EFC1183B2 for ; Sat, 21 Jun 2003 18:02:53 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0378.pppool.de [213.7.3.120]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5LG2mJV005241; Sat, 21 Jun 2003 18:02:52 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-15" From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 21 Jun 2003 18:01:41 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306211700.28612.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] extend list() to supply target name X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2003 16:02:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I've asked you once, but got no answer: Would you be upset if I extend the list() member functions of the backends to supply the AXFR target name as well as the domain_id? Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+9IFlxMLs5v5/7eARAo6kAKCXvONLkvo0G9F0+wpkFXmczB4pRQCgj7vu k7PLxV5fg5cudjKqUZFBp2c=3D =3DjOSO -----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sun Jun 22 18:33:51 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 06525182E0; Sun, 22 Jun 2003 18:33:51 +0200 (CEST) Received: from notebook.linuxnetworks.de (D565e.pppool.de [80.184.86.94]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5MGXfYs013646; Sun, 22 Jun 2003 18:33:44 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-1" From: Norbert Sendetzky Organization: Linuxnetworks Date: Sun, 22 Jun 2003 18:33:10 +0200 User-Agent: KMail/1.4.3 To: PDNS User MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306221831.25369.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: [Pdns-users] Re: AXFR's in powerdns X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 16:33:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 22 June 2003 13:58, Christof Meerwald wrote: > > can you check if the current > > http://www.powerdns.org/pdns-2.9.9.tar.gz does the right thing? I > > just updated it. > > No, that version doesn't get it right either. Sorry guys, the suggestion I sent Bert contained a ! which should not be there: > if(!arg().mustDo("disable-axfr") > return false; > > if(arg()["allow-axfr-ips"].empty()) > return true; must be: if(arg().mustDo("disable-axfr") return false; > Ok, I'll try to go into a bit more detail - I guess there are 4 > relevant cases: > > 1. > disable-axfr=3Dyes > #allow-axfr-ips=3D (empty) > > pdns 2.9.7: deny > pdns 2.9.8: deny > current pdns 2.9.9: allow > my patch: deny Fixed by above correction > 2. > disable-axfr=3Dno > #allow-axfr-ips=3D (empty) > > pdns 2.9.7: allow > pdns 2.9.8: allow > current pdns 2.9.9: deny > my patch: allow Fixed by above correction > 3. > disable-axfr=3Dyes > allow-axfr-ips=3D127.0.0.1 > > pdns 2.9.7: only allow from 127.0.0.1 > pdns 2.9.8: allow > current pdns 2.9.9: only allow from 127.0.0.1 > my patch: only allow from 127.0.0.1 Should be "deny", regardless if allow-axfr-ips is set or not! > 4. > disable-axfr=3Dno > allow-axfr-ips=3D127.0.0.1 > > pdns 2.9.7: allow > pdns 2.9.8: allow > current pdns 2.9.9: deny > my patch: only allow from 127.0.0.1 Should be fixed by above correction Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+9dpGxMLs5v5/7eARAg1qAJ9WTD2m5+zhhgWdvYO/5oRolBaTQQCfYvgw AjMhaKAP8kEvjpPk2tFNZTk=3D =3D6u1x -----END PGP SIGNATURE----- From cmeerw@web.de Sun Jun 22 20:43:18 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id ECD4618047; Sun, 22 Jun 2003 20:43:17 +0200 (CEST) Received: from plenty.utanet.at ([213.90.36.9]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19U9o4-0003i5-00; Sun, 22 Jun 2003 20:43:16 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by plenty.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19U9o4-00034p-00; Sun, 22 Jun 2003 20:43:16 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19U9o3-0005NL-Ec; Sun, 22 Jun 2003 20:43:15 +0200 Date: Sun, 22 Jun 2003 20:43:15 +0200 From: Christof Meerwald To: pdns-users@mailman.powerdns.com, pdns-dev@mailman.powerdns.com Message-ID: <20030622184315.GA20652@hacking.cmeerw.net> References: <200306221831.25369.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306221831.25369.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Re: [Pdns-users] Re: AXFR's in powerdns X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 18:43:18 -0000 On Sun, 22 Jun 2003 18:33:10 +0200, Norbert Sendetzky wrote: > On Sunday 22 June 2003 13:58, Christof Meerwald wrote: >> 3. >> disable-axfr=yes >> allow-axfr-ips=127.0.0.1 >> >> pdns 2.9.7: only allow from 127.0.0.1 >> pdns 2.9.8: allow >> current pdns 2.9.9: only allow from 127.0.0.1 >> my patch: only allow from 127.0.0.1 > > Should be "deny", regardless if allow-axfr-ips is set or not! But this was the documented (and implemented) behaviour for pdns 2.9.7: allow-axfr-ips=... When not allowing AXFR (disable-axfr), DO allow from these IP addresses or netmasks. Changing this behaviour would break existing configurations. bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From cmeerw@web.de Sun Jun 22 23:11:45 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id DB59B18081 for ; Sun, 22 Jun 2003 23:11:45 +0200 (CEST) Received: from patricia.utanet.at ([213.90.36.8]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19UC7e-0005hj-00 for pdns-dev@mailman.powerdns.com; Sun, 22 Jun 2003 23:11:38 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by patricia.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19UC7e-0006IG-00 for pdns-dev@mailman.powerdns.com; Sun, 22 Jun 2003 23:11:38 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19UC7W-0006wH-3s for pdns-dev@mailman.powerdns.com; Sun, 22 Jun 2003 23:11:30 +0200 Date: Sun, 22 Jun 2003 23:11:30 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030622211129.GA25813@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Bug in pdns_recursor (pdns 2.9.9) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 21:11:46 -0000 Hi, pdns/pdns_recursor.cc (line 47) pthread_t pthread_self(void){pthread_t tmp; return tmp;} returning an uninitialized local variable is a very bad idea (and results in empty lines being written to syslog). bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From ahu@outpost.ds9a.nl Mon Jun 23 00:00:04 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 93BEB18025 for ; Mon, 23 Jun 2003 00:00:04 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3AF754511; Mon, 23 Jun 2003 00:00:04 +0200 (CEST) Date: Mon, 23 Jun 2003 00:00:04 +0200 From: bert hubert To: Christof Meerwald Subject: Re: [Pdns-dev] Bug in pdns_recursor (pdns 2.9.9) Message-ID: <20030622220003.GA25847@outpost.ds9a.nl> References: <20030622211129.GA25813@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030622211129.GA25813@hacking.cmeerw.net> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 22:00:04 -0000 On Sun, Jun 22, 2003 at 11:11:30PM +0200, Christof Meerwald wrote: > Hi, > > pdns/pdns_recursor.cc (line 47) > pthread_t pthread_self(void){pthread_t tmp; return tmp;} > > returning an uninitialized local variable is a very bad idea (and results in > empty lines being written to syslog). This function is never called - it is only a bogus function to satisfy an unused dependency. If it is ever called, it is a problem. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From cmeerw@web.de Mon Jun 23 18:53:38 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 840C117FB9 for ; Mon, 23 Jun 2003 18:53:38 +0200 (CEST) Received: from plenty.utanet.at ([213.90.36.9]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19UUZW-0006ME-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 18:53:38 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by plenty.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19UUZV-0002Xp-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 18:53:37 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19UUZU-0000Ji-9C for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 18:53:36 +0200 Date: Mon, 23 Jun 2003 18:53:36 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030623165336.GA1216@hacking.cmeerw.net> References: <20030622211129.GA25813@hacking.cmeerw.net> <20030622220003.GA25847@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030622220003.GA25847@outpost.ds9a.nl> User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 16:53:38 -0000 On Mon, 23 Jun 2003 00:00:04 +0200, bert hubert wrote: > On Sun, Jun 22, 2003 at 11:11:30PM +0200, Christof Meerwald wrote: >> pdns/pdns_recursor.cc (line 47) >> pthread_t pthread_self(void){pthread_t tmp; return tmp;} >> >> returning an uninitialized local variable is a very bad idea (and results in >> empty lines being written to syslog). > This function is never called - it is only a bogus function to satisfy an > unused dependency. If it is ever called, it is a problem. At least pdns/logger.cc calls pthread_self (and pdns_recursor.cc uses the Logger). bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Mon Jun 23 19:22:51 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 29C76181D9 for ; Mon, 23 Jun 2003 19:22:51 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.166.205.NEFkom.net [212.114.166.205]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5NHMn3E015006; Mon, 23 Jun 2003 19:22:49 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 23 Jun 2003 19:21:40 +0200 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Message-Id: <200306231920.48096.norbert@linuxnetworks.de> Content-Type: Multipart/Mixed; boundary="Boundary-00=_kcz9+OszKAgndDP" cc: PDNS Developer Subject: [Pdns-dev] pdns-2.9.10 X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 17:22:51 -0000 --Boundary-00=_kcz9+OszKAgndDP Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert If you are working on 2.9.10, perhaps you can include this patch as well. It's an improvement to differenciate between STL and all other exceptions and rather small (and tested *g*). BTW: Are you working towards 3.0? If yes, when is the date for feature freeze? Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj73NyQACgkQxMLs5v5/7eCnhgCgkyRmLKHGy2IIhbao7+8J9l07 2tkAn3V0ZBilhwJISwwH17Fwx+ERNRBE =e6ka -----END PGP SIGNATURE----- --Boundary-00=_kcz9+OszKAgndDP Content-Type: text/x-diff; charset="iso-8859-15"; name="stl_exception.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stl_exception.diff" --- pdns-2.9.8/modules/ldapbackend/ldapbackend.cc Fri Jun 6 14:43:50 2003 +++ pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Mon Jun 23 17:06:54 2003 @@ -148,9 +148,14 @@ L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = m_pldap->search( getArg("basedn"), filter, (const char**) attributes ); } - catch( LDAPException &e ) + catch( LDAPException &le ) { - L << Logger::Warning << backendname << " Unable to search LDAP directory: " << e.what() << endl; + L << Logger::Warning << backendname << " Unable to search LDAP directory: " << le.what() << endl; + return; + } + catch( exception &e ) + { + L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; return; } catch( ... ) @@ -239,9 +244,13 @@ goto Redo; } } - catch( LDAPException &e ) + catch( LDAPException &le ) + { + L << Logger::Warning << backendname << " Search failed: " << le.what() << endl; + } + catch( exception &e ) { - L << Logger::Warning << backendname << " Search failed: " << e.what() << endl; + L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; } catch( ... ) { --Boundary-00=_kcz9+OszKAgndDP-- From norbert@linuxnetworks.de Mon Jun 23 21:23:26 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 3E58918320 for ; Mon, 23 Jun 2003 21:23:26 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.182.126.NEFkom.net [212.114.182.126]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5NJNPSl023676; Mon, 23 Jun 2003 21:23:25 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-15" From: Norbert Sendetzky Organization: Linuxnetworks To: Christof Meerwald Subject: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Date: Mon, 23 Jun 2003 21:21:54 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306232122.03144.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 19:23:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > On Mon, 23 Jun 2003 00:00:04 +0200, bert hubert wrote: >> On Sun, Jun 22, 2003 at 11:11:30PM +0200, Christof Meerwald wrote: >>> pdns/pdns_recursor.cc (line 47) >>> pthread_t pthread_self(void){pthread_t tmp; return tmp;} >>>=20 >>> returning an uninitialized local variable is a very bad idea (and res= ults=20 > in >>> empty lines being written to syslog). >> This function is never called - it is only a bogus function to satisfy= an >> unused dependency. If it is ever called, it is a problem. > > At least pdns/logger.cc calls pthread_self (and pdns_recursor.cc uses t= he > Logger). Well, Logger will call the real pthread_self() function and not the dummy= (I=20 hope). To remove the warning, simply change the line to: pthread_t pthread_self(void){return (pthread_t) 0;} Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+91NaxMLs5v5/7eARAnVDAJ9y+t4FO5Aukcw80JoLS972/b2CpgCfdDiV m1uUSi46Ti8gkRoQTtunZWc=3D =3DJtw1 -----END PGP SIGNATURE----- From cmeerw@web.de Mon Jun 23 21:43:13 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 8DD6B17F81 for ; Mon, 23 Jun 2003 21:43:13 +0200 (CEST) Received: from plenty.utanet.at ([213.90.36.9]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19UXDc-0000Um-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 21:43:12 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by plenty.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19UXDc-0003AZ-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 21:43:12 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19UXDa-0000Tu-Rp for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 21:43:10 +0200 Date: Mon, 23 Jun 2003 21:43:10 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030623194310.GA1822@hacking.cmeerw.net> References: <200306232122.03144.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306232122.03144.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 19:43:13 -0000 On Mon, 23 Jun 2003 21:21:54 +0200, Norbert Sendetzky wrote: >> On Mon, 23 Jun 2003 00:00:04 +0200, bert hubert wrote: >>> On Sun, Jun 22, 2003 at 11:11:30PM +0200, Christof Meerwald wrote: >>>> pdns/pdns_recursor.cc (line 47) >>>> pthread_t pthread_self(void){pthread_t tmp; return tmp;} >>>> returning an uninitialized local variable is a very bad idea (and results >> in >>>> empty lines being written to syslog). >>> This function is never called - it is only a bogus function to satisfy an >>> unused dependency. If it is ever called, it is a problem. >> At least pdns/logger.cc calls pthread_self (and pdns_recursor.cc uses the >> Logger). > Well, Logger will call the real pthread_self() function and not the dummy (I > hope). There is no other (or real) pthread_self function - pdns_recursor doesn't link with -lpthread. And even if it would, I think it would still call the locally overridden pthread_self. > To remove the warning, simply change the line to: > pthread_t pthread_self(void){return (pthread_t) 0;} I know, but it's not portable - I don't know that pthread_t really is an integer, it could also be a struct. bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Mon Jun 23 22:29:40 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 622021819A for ; Mon, 23 Jun 2003 22:29:40 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.182.126.NEFkom.net [212.114.182.126]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5NKTcFB021561; Mon, 23 Jun 2003 22:29:39 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-1" From: Norbert Sendetzky Organization: Linuxnetworks To: Christof Meerwald Subject: Re: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Date: Mon, 23 Jun 2003 22:28:22 +0200 User-Agent: KMail/1.4.3 References: <200306232122.03144.norbert@linuxnetworks.de> <20030623194310.GA1822@hacking.cmeerw.net> In-Reply-To: <20030623194310.GA1822@hacking.cmeerw.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306232228.24057.norbert@linuxnetworks.de> cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 20:29:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 23 June 2003 21:43, Christof Meerwald wrote: > > Well, Logger will call the real pthread_self() function and not the d= ummy > > (I hope). > > There is no other (or real) pthread_self function - pdns_recursor doesn= 't > link with -lpthread. And even if it would, I think it would still call = the > locally overridden pthread_self. Hmm, that's funny. I thought PDNS is using threads. But you may be right = that=20 the pthread_self function may be overwritten. I simply don't know, what=20 extern "C" is really doing if you supply a function with a body. > > To remove the warning, simply change the line to: > > pthread_t pthread_self(void){return (pthread_t) 0;} > > I know, but it's not portable - I don't know that pthread_t really is a= n > integer, it could also be a struct. Yes, that's not the most portable way, but it is ok in this case because=20 pthread_t is a long integer if I remember correctly. Before we are arguin= g=20 about the cast, it would be better to know what the "extern" thing is rea= lly=20 doing. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+92LnxMLs5v5/7eARAluoAJ0Rih7jmw7/qaDc5I5l6zr3HbkmVQCfWmeT DfcNPDUXNpBLM3rMH1G5lpk=3D =3D23FR -----END PGP SIGNATURE----- From cmeerw@web.de Mon Jun 23 22:41:19 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 015E818318 for ; Mon, 23 Jun 2003 22:41:19 +0200 (CEST) Received: from paris.utanet.at ([213.90.36.7]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19UY7o-0003ug-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 22:41:16 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by paris.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19UY7n-0004wv-00 for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 22:41:16 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19UY7l-0000W9-Ua for pdns-dev@mailman.powerdns.com; Mon, 23 Jun 2003 22:41:13 +0200 Date: Mon, 23 Jun 2003 22:41:13 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030623204113.GA1980@hacking.cmeerw.net> References: <200306232122.03144.norbert@linuxnetworks.de> <20030623194310.GA1822@hacking.cmeerw.net> <200306232228.24057.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306232228.24057.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 20:41:19 -0000 On Mon, 23 Jun 2003 22:28:22 +0200, Norbert Sendetzky wrote: > On Monday 23 June 2003 21:43, Christof Meerwald wrote: >> > Well, Logger will call the real pthread_self() function and not the dummy >> > (I hope). >> There is no other (or real) pthread_self function - pdns_recursor doesn't >> link with -lpthread. And even if it would, I think it would still call the >> locally overridden pthread_self. > Hmm, that's funny. I thought PDNS is using threads. Yes, pdns is using threads, but the recursor is not (instead it uses some kind of non-preemptive user-level threads using makecontext/swapcontext on Unix or fibers on Win32). bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Tue Jun 24 10:30:03 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 14D0A181FB for ; Tue, 24 Jun 2003 10:30:03 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5O8Tvea025129; Tue, 24 Jun 2003 10:29:58 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: Christof Meerwald , pdns-dev@mailman.powerdns.com Subject: Re: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Date: Tue, 24 Jun 2003 10:28:48 +0200 User-Agent: KMail/1.5.2 References: <200306232122.03144.norbert@linuxnetworks.de> <200306232228.24057.norbert@linuxnetworks.de> <20030623204113.GA1980@hacking.cmeerw.net> In-Reply-To: <20030623204113.GA1980@hacking.cmeerw.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200306241028.49878.norbert@linuxnetworks.de> X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 08:30:03 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 23 June 2003 22:41, Christof Meerwald wrote: > Yes, pdns is using threads, but the recursor is not (instead it > uses some kind of non-preemptive user-level threads using > makecontext/swapcontext on Unix or fibers on Win32). Ok, the savest way would be to remove the function bodies in the=20 extern "C" block and link pdns_recursor against -lpthread. Otherwise=20 the mutex things won't work either. Maybe this is not a "real"=20 problem, but the current code is very unclean. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj74C8AACgkQxMLs5v5/7eB45gCffNh34EYQfyQhxvCXWZ+dolz5 tesAn1h/Lkfx3m2fSYUnmT1103yrFyRO =3DZJW0 =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Tue Jun 24 11:19:34 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 067291801C for ; Tue, 24 Jun 2003 11:19:34 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3182D4103; Tue, 24 Jun 2003 11:17:06 +0200 (CEST) Date: Tue, 24 Jun 2003 11:17:06 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Message-ID: <20030624091706.GA4827@outpost.ds9a.nl> References: <200306232122.03144.norbert@linuxnetworks.de> <200306232228.24057.norbert@linuxnetworks.de> <20030623204113.GA1980@hacking.cmeerw.net> <200306241028.49878.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306241028.49878.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: Christof Meerwald cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 09:19:34 -0000 On Tue, Jun 24, 2003 at 10:28:48AM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Monday 23 June 2003 22:41, Christof Meerwald wrote: > > Yes, pdns is using threads, but the recursor is not (instead it > > uses some kind of non-preemptive user-level threads using > > makecontext/swapcontext on Unix or fibers on Win32). > > Ok, the savest way would be to remove the function bodies in the > extern "C" block and link pdns_recursor against -lpthread. Otherwise > the mutex things won't work either. Maybe this is not a "real" > problem, but the current code is very unclean. We can't compile the pdns_recursor against -lpthread as that causes big problems with get/set/make/swapcontext. I've discussed that with Ulrich Drepper, one of the glibc guys, and it is pretty fundamental. Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Tue Jun 24 13:29:02 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 5906317FA5 for ; Tue, 24 Jun 2003 13:29:02 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5OBSxSl005116; Tue, 24 Jun 2003 13:28:59 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Date: Tue, 24 Jun 2003 13:27:07 +0200 User-Agent: KMail/1.5.2 References: <200306232122.03144.norbert@linuxnetworks.de> <200306241028.49878.norbert@linuxnetworks.de> <20030624091706.GA4827@outpost.ds9a.nl> In-Reply-To: <20030624091706.GA4827@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200306241327.08861.norbert@linuxnetworks.de> cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 11:29:02 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 24 June 2003 11:17, bert hubert wrote: > We can't compile the pdns_recursor against -lpthread as that causes > big problems with get/set/make/swapcontext. > > I've discussed that with Ulrich Drepper, one of the glibc guys, and > it is pretty fundamental. Well, seems like this is the only possibility. I assume that the=20 pthread stuff in pdns_recursor is not really necessary, because it's=20 "single threaded" (read: only using one process doing *context). Therefore "return (pthread_t) 0;" is ok (return tmp; would be=20 undefined and thus a bug), but what's about the other pthread=20 functions (mutex_{lock,unlock}) Logger is using? They are not defined=20 in the extern "C" block. Shouldn't they be defined either? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj74NYsACgkQxMLs5v5/7eBlLQCfX1o+RiAf2zhPvgo/U3gjnlkp U5kAoLG6mxufeQ+j/w9TLmcCDBDfNs9g =3DOGnh =2D----END PGP SIGNATURE----- From cmeerw@web.de Tue Jun 24 19:01:17 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 3F963180B1 for ; Tue, 24 Jun 2003 19:01:17 +0200 (CEST) Received: from pam.utanet.at ([213.90.36.6]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19UrAO-0002xJ-00 for pdns-dev@mailman.powerdns.com; Tue, 24 Jun 2003 19:01:12 +0200 Received: from [62.218.247.51] (helo=hacking.cmeerw.net) by pam.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19UrAO-0006Ch-00 for pdns-dev@mailman.powerdns.com; Tue, 24 Jun 2003 19:01:12 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19UrAN-0000Fq-6d for pdns-dev@mailman.powerdns.com; Tue, 24 Jun 2003 19:01:11 +0200 Date: Tue, 24 Jun 2003 19:01:11 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030624170111.GA970@hacking.cmeerw.net> References: <200306241327.08861.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306241327.08861.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Subject: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 17:01:17 -0000 On Tue, 24 Jun 2003 13:27:07 +0200, Norbert Sendetzky wrote: > Therefore "return (pthread_t) 0;" is ok (return tmp; would be > undefined and thus a bug), but what's about the other pthread > functions (mutex_{lock,unlock}) Logger is using? They are not defined > in the extern "C" block. Shouldn't they be defined either? I guess the reason why they are not causing any trouble is because Linux's libc already provides dummy implementations for them as weak functions (and uses them for single-threaded programs - multithreaded programs get the real implementation from libpthread). bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Fri Jun 27 19:25:42 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id C3DB417FDB for ; Fri, 27 Jun 2003 19:25:42 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.182.91.NEFkom.net [212.114.182.91]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5RHPfxc020182 for ; Fri, 27 Jun 2003 19:25:41 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS Developer Date: Fri, 27 Jun 2003 19:19:00 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_OFH5QGAN0LUHVQG234KO" Message-Id: <200306271919.02869.norbert@linuxnetworks.de> Subject: [Pdns-dev] KEY Record X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2003 17:25:43 -0000 --------------Boundary-00=_OFH5QGAN0LUHVQG234KO Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I've tried to implement KEY records according to RFC 2535, but ran=20 into a problem: Key record RData should be plain and simple look like this: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | flags | protocol | algorithm | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | / / public key / / / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| but if I fill in this values: (flags) (proto) (algo) (teststring, base64 encoded) 512 4 3 dGVzdHN0cmluZw=3D=3D I don't get a correct answer by using "dig" or "host". "dig" lists an=20 answer packet but outputs nothing and "host" tells me: ;; Warning: Message parser reports malformed message packet. So, what's wrong with my packets? Can anyone give me a hint? See patch attached for implementation. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+/HyExMLs5v5/7eARAgQ3AJ9VHEyIzHlG0ASuvyfq4OVPYG2hpgCfccF0 H2ph/wN6nwcLOuq88yLzk7w=3D =3DcDW6 -----END PGP SIGNATURE----- --------------Boundary-00=_OFH5QGAN0LUHVQG234KO Content-Type: text/x-diff; charset="iso-8859-15"; name="keyrecord.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="keyrecord.diff" diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.hh pdns-2.9.9.new/modules/ldapbackend/ldapbackend.hh --- pdns-2.9.9/modules/ldapbackend/ldapbackend.hh Sat Jun 21 14:16:38 2003 +++ pdns-2.9.9.new/modules/ldapbackend/ldapbackend.hh Thu Jun 26 20:16:36 2003 @@ -56,6 +56,7 @@ "mXRecord", "tXTRecord", "rPRecord", + "kEYRecord", "aAAARecord", "lOCRecord", "nAPTRRecord", diff -ru pdns-2.9.9/pdns/dnspacket.cc pdns-2.9.9.new/pdns/dnspacket.cc --- pdns-2.9.9/pdns/dnspacket.cc Thu Mar 27 11:40:40 2003 +++ pdns-2.9.9.new/pdns/dnspacket.cc Fri Jun 27 18:57:52 2003 @@ -868,13 +868,57 @@ stringbuffer.append(piece3); if(place==DNSResourceRecord::AUTHORITY) - d.nscount++; + d.nscount += 1; else - d.ancount++; + d.ancount += 1; } +void DNSPacket::addKEYRecord( const DNSResourceRecord& rr ) +{ + addKEYRecord( rr.qname, rr.content, rr.ttl ); +} + +void DNSPacket::addKEYRecord( const string domain, const string content, u_int32_t ttl ) +{ + unsigned int j; + int i = 3; + char p[10]; + string piece1; + vector parts, fields( 4, "0" ); + u_int8_t aux[4] = { 0, 0, 0, 0 }; + + + makeHeader( p, QType::KEY, ttl ); + toqname( domain, &piece1 ); + stringtok( parts, content, " " ); + + while( i >= 0 && !parts.empty() ) + { + fields[i--] = parts.back(); + parts.pop_back(); + } + + ((u_int16_t*) aux)[0] = htons( (u_int16_t) strtol( fields[0].c_str(), NULL, 10 ) ); + aux[2] = (u_int8_t) strtol( fields[1].c_str(), NULL, 10 ); + aux[3] = (u_int8_t) strtol( fields[2].c_str(), NULL, 10 ); + + stringbuffer.append( piece1 ); + stringbuffer.append( p, 10 ); + stringbuffer.append( (char*) aux, 4 ); + stringbuffer.append( fields[3] ); + + d.ancount += 1; + +/* L << "addKEYRecord(): "; + for( j=0; j < stringbuffer.length(); j++ ) + L << " " << stringbuffer[j]; + L << endl; +*/ +} + + static int rrcomp(const DNSResourceRecord &A, const DNSResourceRecord &B) { if(A.d_place namenum; --------------Boundary-00=_OFH5QGAN0LUHVQG234KO-- From norbert@linuxnetworks.de Sat Jun 28 18:18:01 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id E426317FBD for ; Sat, 28 Jun 2003 18:18:00 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0353.pppool.de [213.7.3.83]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5SGHpr2018889; Sat, 28 Jun 2003 18:17:53 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 28 Jun 2003 18:06:59 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_NR87JU6VS23YED2909LC" Message-Id: <200306281807.09484.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] AXFR list(): extended by target X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2003 16:18:01 -0000 --------------Boundary-00=_NR87JU6VS23YED2909LC Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Like I've mentioned a few weeks before, I've extended the=20 *Backend::list() function to provide the AXFR target. This is=20 necessary for backends which cannot store domain IDs. Patch to pdns-2.9.9 is attached. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+/b0mxMLs5v5/7eARAmkzAJ0VY3Riwu64wSvXl8g+LUeRlUSTWQCfdnXA 6YkXFY5/Auh1DyXeAd0Mgpk=3D =3DhWKR -----END PGP SIGNATURE----- --------------Boundary-00=_NR87JU6VS23YED2909LC Content-Type: text/x-diff; charset="iso-8859-15"; name="list_target.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="list_target.diff" diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.cc pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc --- pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Sat Jun 21 14:17:51 2003 +++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc Sat Jun 28 16:41:31 2003 @@ -60,8 +60,9 @@ } -bool LdapBackend::list( int domain_id ) +bool LdapBackend::list( const string &target, int domain_id ) { + L << Logger::Warning << backendname << " AXFR request for " << target << endl; L << Logger::Warning << backendname << " AXFR is not supported" << endl; return false; } diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.hh pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh --- pdns-2.9.9/modules/ldapbackend/ldapbackend.hh Sat Jun 21 14:16:38 2003 +++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh Sat Jun 28 16:41:31 2003 @@ -83,7 +83,7 @@ ~LdapBackend(); void lookup( const QType &qtype, const string &qdomain, DNSPacket *p=0, int zoneid=-1 ); - bool list( int domain_id ); + bool list( const string &target, int domain_id ); bool get( DNSResourceRecord &rr ); }; diff -ru pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc --- pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc Mon Jan 6 17:13:59 2003 +++ pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc Sat Jun 28 16:41:31 2003 @@ -103,7 +103,7 @@ d_qtype=qtype; } -bool MySQLBackend::list(int domain_id ) +bool MySQLBackend::list(const string &target, int domain_id ) { DLOG(L<Query(query); } -bool PdnsBackend::list(int inZoneId) +bool PdnsBackend::list(const string &target, int inZoneId) { //cout << "PdnsBackend::list" << endl; diff -ru pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh --- pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh Thu Mar 13 13:45:30 2003 +++ pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh Sat Jun 28 16:41:31 2003 @@ -18,7 +18,7 @@ ~PdnsBackend(); void lookup(const QType &, const string &qdomain, DNSPacket *p = 0, int zoneId = -1); - bool list(int inZoneId); + bool list(const string &target, int inZoneId); bool get(DNSResourceRecord& outRecord); bool getSOA(const string &name, SOAData &soadata); Only in pdns-2.9.9.list/modules/pipebackend: .deps Only in pdns-2.9.9.list/modules/pipebackend: Makefile diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.cc pdns-2.9.9.list/modules/pipebackend/pipebackend.cc --- pdns-2.9.9/modules/pipebackend/pipebackend.cc Mon Dec 16 14:04:27 2002 +++ pdns-2.9.9.list/modules/pipebackend/pipebackend.cc Sat Jun 28 16:41:31 2003 @@ -118,7 +118,7 @@ d_qname=qname; } -bool PipeBackend::list(int inZoneId) +bool PipeBackend::list(const string &target, int inZoneId) { try { d_disavow=false; diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.hh pdns-2.9.9.list/modules/pipebackend/pipebackend.hh --- pdns-2.9.9/modules/pipebackend/pipebackend.hh Wed Nov 27 16:31:59 2002 +++ pdns-2.9.9.list/modules/pipebackend/pipebackend.hh Sat Jun 28 16:41:31 2003 @@ -59,7 +59,7 @@ PipeBackend(const string &suffix=""); ~PipeBackend(); void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1); - bool list(int domain_id); + bool list(const string &target, int domain_id); bool get(DNSResourceRecord &r); static DNSBackend *maker(); diff -ru pdns-2.9.9/modules/xdbbackend/xdbbackend.cc pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc --- pdns-2.9.9/modules/xdbbackend/xdbbackend.cc Mon Dec 16 15:07:04 2002 +++ pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc Sat Jun 28 16:41:31 2003 @@ -30,7 +30,7 @@ delete d_db; } - bool list(int id) { + bool list(const string &target, int id) { return false; // we don't support AXFR (go away) } diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.cc pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc --- pdns-2.9.9/pdns/backends/bind/bindbackend.cc Fri Feb 28 12:43:25 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc Sat Jun 28 16:41:31 2003 @@ -756,7 +756,7 @@ return true; } -bool BindBackend::list(int id) +bool BindBackend::list(const string &target, int id) { if(!d_zone_id_map.count(id)) return false; diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.hh pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh --- pdns-2.9.9/pdns/backends/bind/bindbackend.hh Mon Feb 3 15:38:24 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh Sat Jun 28 16:41:31 2003 @@ -177,7 +177,7 @@ void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1); - bool list(int id); + bool list(const string &target, int id); bool get(DNSResourceRecord &); static DNSBackend *maker(); Only in pdns-2.9.9.list/pdns/backends/bind: bindbackend.hh.orig diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend2.cc pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc --- pdns-2.9.9/pdns/backends/bind/bindbackend2.cc Thu Mar 20 14:29:29 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc Sat Jun 28 16:41:31 2003 @@ -726,7 +726,7 @@ return true; } -bool Bind2Backend::list(int id) +bool Bind2Backend::list(const string &target, int id) { cout<<"List of id "<list(sd.domain_id))) + if(!(this->list(domain, sd.domain_id))) throw AhuException("Backend error trying to determine magic serial number of zone '"+domain+"'"); while(this->get(i)) { diff -ru pdns-2.9.9/pdns/dnsbackend.hh pdns-2.9.9.list/pdns/dnsbackend.hh --- pdns-2.9.9/pdns/dnsbackend.hh Mon Feb 3 15:38:25 2003 +++ pdns-2.9.9.list/pdns/dnsbackend.hh Sat Jun 28 16:46:07 2003 @@ -80,7 +80,7 @@ if the backend does not consider itself responsible for the id passed. \param domain_id ID of which a list is requested */ - virtual bool list(int domain_id)=0; + virtual bool list(const string &target, int domain_id)=0; virtual ~DNSBackend(){}; diff -ru pdns-2.9.9/pdns/randombackend.cc pdns-2.9.9.list/pdns/randombackend.cc --- pdns-2.9.9/pdns/randombackend.cc Wed Nov 27 16:18:33 2002 +++ pdns-2.9.9.list/pdns/randombackend.cc Sat Jun 28 17:28:44 2003 @@ -34,7 +34,7 @@ d_ourname=getArg("hostname"); } - bool list(int id) { + bool list(const string &target, int id) { return false; // we don't support AXFR } diff -ru pdns-2.9.9/pdns/tcpreceiver.cc pdns-2.9.9.list/pdns/tcpreceiver.cc --- pdns-2.9.9/pdns/tcpreceiver.cc Sun Jun 22 13:11:41 2003 +++ pdns-2.9.9.list/pdns/tcpreceiver.cc Sat Jun 28 17:23:25 2003 @@ -246,7 +246,7 @@ static bool canDoAXFR(DNSPacket *q) { - if(!arg().mustDo("disable-axfr") + if(arg().mustDo("disable-axfr")) return false; if(arg()["allow-axfr-ips"].empty()) @@ -330,7 +330,7 @@ DNSBackend *B=sd.db; // get the RIGHT backend // now list zone - if(!(B->list(sd.domain_id))) { + if(!(B->list(target, sd.domain_id))) { L<setRcode(2); // 'SERVFAIL' sendDelPacket(outpacket,outsock); @@ -451,7 +451,7 @@ L< &); --------------Boundary-00=_NR87JU6VS23YED2909LC-- From ahu@outpost.ds9a.nl Sat Jun 28 18:22:49 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 072CF18013 for ; Sat, 28 Jun 2003 18:22:49 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 88F6440F5; Sat, 28 Jun 2003 18:22:48 +0200 (CEST) Date: Sat, 28 Jun 2003 18:22:48 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030628162248.GA8059@outpost.ds9a.nl> References: <200306281807.09484.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306281807.09484.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: AXFR list(): extended by target X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2003 16:22:49 -0000 On Sat, Jun 28, 2003 at 06:06:59PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > Like I've mentioned a few weeks before, I've extended the > *Backend::list() function to provide the AXFR target. This is > necessary for backends which cannot store domain IDs. Do you think we need this for 2.9.10? I want to release that tonight and try to only fix current problems. Are you happy with your latest AXFR remarks, can I apply them? Thanks! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sun Jun 29 14:27:24 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 59F7917F86 for ; Sun, 29 Jun 2003 14:27:24 +0200 (CEST) Received: from notebook.linuxnetworks.de (D5711.pppool.de [80.184.87.17]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5TCRKc0024057; Sun, 29 Jun 2003 14:27:21 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-1" From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sun, 29 Jun 2003 14:22:03 +0200 User-Agent: KMail/1.4.3 References: <200306281807.09484.norbert@linuxnetworks.de> <20030628162248.GA8059@outpost.ds9a.nl> In-Reply-To: <20030628162248.GA8059@outpost.ds9a.nl> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306291422.12556.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: AXFR list(): extended by target X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 12:27:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 28 June 2003 18:22, bert hubert wrote: > > Like I've mentioned a few weeks before, I've extended the > > *Backend::list() function to provide the AXFR target. This is > > necessary for backends which cannot store domain IDs. > > Do you think we need this for 2.9.10? I want to release that > tonight and try to only fix current problems. No, this patch is not a necessity for 2.9.10. It would be better to=20 include it in 2.9.11 or so. You will also get the AXFR code for the ldapbackend soon. > Are you happy with your latest AXFR remarks, can I apply them? Yes, they work as expected and described by me. Remember that=20 allow-axfr-ips cannot overwrite disable-axfr=3Dyes any more. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+/tnyxMLs5v5/7eARAucLAJ9v/1Z1lILXSN5irjo+k8IelLWViwCeJrCJ FDlljrnJdg48x6I54WFT98Q=3D =3DNokE -----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sun Jun 29 18:54:41 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id F06F517F9D for ; Sun, 29 Jun 2003 18:54:40 +0200 (CEST) Received: from notebook.linuxnetworks.de (D5c14.pppool.de [80.184.92.20]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5TGsbrQ025813; Sun, 29 Jun 2003 18:54:38 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sun, 29 Jun 2003 16:22:22 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Message-Id: <200306291619.50978.norbert@linuxnetworks.de> Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_ALY85RFEZ2TS0PQ2M91R" cc: PDNS Developer Subject: [Pdns-dev] LDAP: scope patch X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 16:54:41 -0000 --------------Boundary-00=_ALY85RFEZ2TS0PQ2M91R Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The attached diff contains an extension of the PowerLDAP class to support the scope (LDAP_SCOPE_{ONE,BASE,SUBTREE}) parameter. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+/vYexMLs5v5/7eARAqiXAJ9LxRMqW+TT1rCRkHvzElEl7CnvhgCfb8gf aGv+2hOaDVdMqIRSzfJyt0k=3D =3DG81E -----END PGP SIGNATURE----- --------------Boundary-00=_ALY85RFEZ2TS0PQ2M91R Content-Type: text/x-diff; charset="iso-8859-15"; name="ldap_scope.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldap_scope.diff" diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.cc pdns-2.9.9.scope/modules/ldapbackend/ldapbackend.cc --- pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Sat Jun 21 14:17:51 2003 +++ pdns-2.9.9.scope/modules/ldapbackend/ldapbackend.cc Sun Jun 29 16:08:40 2003 @@ -146,7 +146,7 @@ } L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; - m_msgid = m_pldap->search( getArg("basedn"), filter, (const char**) attributes ); + m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); } catch( LDAPException &e ) { diff -ru pdns-2.9.9/modules/ldapbackend/powerldap.cc pdns-2.9.9.scope/modules/ldapbackend/powerldap.cc --- pdns-2.9.9/modules/ldapbackend/powerldap.cc Sat Jun 21 12:04:32 2003 +++ pdns-2.9.9.scope/modules/ldapbackend/powerldap.cc Sun Jun 29 16:06:22 2003 @@ -72,11 +72,11 @@ } -int PowerLDAP::search(const string& base, const string& filter, const char **attr) +int PowerLDAP::search(const string& base, int scope, const string& filter, const char **attr) { int msgid; - if( ( msgid = ldap_search( d_ld, base.c_str(), LDAP_SCOPE_SUBTREE, filter.c_str(),const_cast(attr),0 ) ) == -1 ) + if( ( msgid = ldap_search( d_ld, base.c_str(), scope, filter.c_str(),const_cast(attr),0 ) ) == -1 ) throw LDAPException("Starting LDAP search: "+getError()); return msgid; diff -ru pdns-2.9.9/modules/ldapbackend/powerldap.hh pdns-2.9.9.scope/modules/ldapbackend/powerldap.hh --- pdns-2.9.9/modules/ldapbackend/powerldap.hh Thu Mar 20 23:11:57 2003 +++ pdns-2.9.9.scope/modules/ldapbackend/powerldap.hh Sun Jun 29 16:07:36 2003 @@ -33,7 +33,7 @@ PowerLDAP(const string &host="127.0.0.1", u_int16_t port=389); void simpleBind(const string &ldapbinddn="", const string& ldapsecret=""); - int search(const string& base, const string& filter, const char **attr=0); + int search(const string& base, int scope, const string& filter, const char **attr=0); bool getSearchEntry(int msgid, sentry_t &entry); void getSearchResults(int msgid, sresult_t &result); ~PowerLDAP(); --------------Boundary-00=_ALY85RFEZ2TS0PQ2M91R-- From norbert@linuxnetworks.de Sun Jun 29 18:54:42 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 1114717F9D for ; Sun, 29 Jun 2003 18:54:42 +0200 (CEST) Received: from notebook.linuxnetworks.de (D5c14.pppool.de [80.184.92.20]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h5TGsbrS025813 for ; Sun, 29 Jun 2003 18:54:41 +0200 (MEST) Content-Type: text/plain; charset="iso-8859-15" From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS Developer Date: Sun, 29 Jun 2003 17:04:01 +0200 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306291704.02868.norbert@linuxnetworks.de> Subject: [Pdns-dev] Log level policy? X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 16:54:42 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Is there an official policy how to use log levels for Logger=20 correctly, e.g. in which situation to use critical, error, warning,=20 notice and info? Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+/v/hxMLs5v5/7eARAkiQAJ9im5DkkuSqKx6yXLYl1hb8HIb9BQCePrRm +qmOdV075JkZdjd1eB28WQQ=3D =3DhNUc -----END PGP SIGNATURE----- From norbert@linuxnetworks.de Tue Jul 1 17:19:44 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 30BAF1807F for ; Tue, 1 Jul 2003 17:19:44 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h61FJgP6026992; Tue, 1 Jul 2003 17:19:42 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Tue, 1 Jul 2003 17:18:05 +0200 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_tYaA/8wDocwAPXY" Message-Id: <200307011718.11118.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] PowerLDAP DN extension X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 15:19:44 -0000 --Boundary-00=_tYaA/8wDocwAPXY Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The file attached contains a patch to extend the PowerLDAP class to=20 return DNs if necessary (required for the LDAP AXFR patch which will=20 be coming soon). Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8BpjEACgkQxMLs5v5/7eB+xgCcC2dQ3G5hCruGCUspsLBRKoPX Xe0An16ks5zGOIvt/rpfXhkp2LhBdZkY =3D6Bwy =2D----END PGP SIGNATURE----- --Boundary-00=_tYaA/8wDocwAPXY Content-Type: text/x-diff; charset="iso-8859-15"; name="powerldap_dn.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="powerldap_dn.diff" --- pdns-2.9.9.axfr/modules/ldapbackend/powerldap.hh Tue Jul 1 17:13:04 2003 +++ pdns-2.9.9.dn/modules/ldapbackend/powerldap.hh Sun Jun 29 18:42:33 2003 @@ -34,8 +34,8 @@ PowerLDAP(const string &host="127.0.0.1", u_int16_t port=389); void simpleBind(const string &ldapbinddn="", const string& ldapsecret=""); int search(const string& base, int scope, const string& filter, const char **attr=0); - bool getSearchEntry(int msgid, sentry_t &entry); - void getSearchResults(int msgid, sresult_t &result); + bool getSearchEntry(int msgid, sentry_t &entry, bool withdn); + void getSearchResults(int msgid, sresult_t &result, bool withdn); ~PowerLDAP(); static const string escape(const string &tobe); private: --- pdns-2.9.9.axfr/modules/ldapbackend/powerldap.cc Tue Jul 1 17:14:18 2003 +++ pdns-2.9.9.dn/modules/ldapbackend/powerldap.cc Tue Jul 1 13:16:17 2003 @@ -9,7 +9,7 @@ -PowerLDAP::PowerLDAP( const string &host, u_int16_t port ) : d_host( host ), d_port( port ), d_timeout( 1 ) +PowerLDAP::PowerLDAP( const string &host, u_int16_t port ) : d_host( host ), d_port( port ), d_timeout( 5 ) { int protocol = LDAP_VERSION3; @@ -82,7 +82,7 @@ return msgid; } -bool PowerLDAP::getSearchEntry(int msgid, sentry_t &entry) +bool PowerLDAP::getSearchEntry(int msgid, sentry_t &entry, bool withdn) { entry.clear(); int rc=waitResult(msgid,&d_searchresult); @@ -99,6 +99,15 @@ // we now have an entry in d_searchentry + if( withdn == true ) + { + vector dnresult; + char* dn = ldap_get_dn( d_ld, d_searchentry ); + dnresult.push_back( dn ); + ldap_memfree( dn ); + entry["dn"] = dnresult; + } + BerElement *ber; for(char *attr = ldap_first_attribute( d_ld, d_searchresult, &ber ); attr ; attr=ldap_next_attribute(d_ld, d_searchresult, ber)) { @@ -119,11 +128,11 @@ return true; } -void PowerLDAP::getSearchResults(int msgid, sresult_t &result) +void PowerLDAP::getSearchResults(int msgid, sresult_t &result, bool withdn) { result.clear(); sentry_t entry; - while(getSearchEntry(msgid, entry)) + while(getSearchEntry(msgid, entry, withdn)) result.push_back(entry); } --Boundary-00=_tYaA/8wDocwAPXY-- From ahu@outpost.ds9a.nl Thu Jul 3 09:34:28 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 5E23A18144 for ; Thu, 3 Jul 2003 09:34:28 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 1DFD4461F; Thu, 3 Jul 2003 09:34:28 +0200 (CEST) Date: Thu, 3 Jul 2003 09:34:27 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030703073427.GA8185@outpost.ds9a.nl> References: <200306281807.09484.norbert@linuxnetworks.de> <20030628162248.GA8059@outpost.ds9a.nl> <200306291422.12556.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306291422.12556.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: AXFR list(): extended by target X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 07:34:28 -0000 On Sun, Jun 29, 2003 at 02:22:03PM +0200, Norbert Sendetzky wrote: > > Are you happy with your latest AXFR remarks, can I apply them? > > Yes, they work as expected and described by me. Remember that > allow-axfr-ips cannot overwrite disable-axfr=yes any more. Ok - so this is a change in documented behaviour? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Thu Jul 3 09:37:08 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 646D61814A for ; Thu, 3 Jul 2003 09:37:08 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3DF3B4601; Thu, 3 Jul 2003 09:37:08 +0200 (CEST) Date: Thu, 3 Jul 2003 09:37:08 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] Log level policy? Message-ID: <20030703073708.GB8185@outpost.ds9a.nl> References: <200306291704.02868.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306291704.02868.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 07:37:08 -0000 On Sun, Jun 29, 2003 at 05:04:01PM +0200, Norbert Sendetzky wrote: > Is there an official policy how to use log levels for Logger > correctly, e.g. in which situation to use critical, error, warning, > notice and info? Not yet. There should be one though. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Thu Jul 3 09:39:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 6BF6918149 for ; Thu, 3 Jul 2003 09:39:35 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3D74A4601; Thu, 3 Jul 2003 09:39:35 +0200 (CEST) Date: Thu, 3 Jul 2003 09:39:35 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030703073935.GC8185@outpost.ds9a.nl> References: <200306291619.50978.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306291619.50978.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: LDAP: scope patch X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 07:39:35 -0000 On Sun, Jun 29, 2003 at 04:22:22PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > The attached diff contains an extension of the PowerLDAP class to > support the scope (LDAP_SCOPE_{ONE,BASE,SUBTREE}) parameter. Applied, thanks! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Thu Jul 3 09:40:01 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 0C1D918144 for ; Thu, 3 Jul 2003 09:40:01 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id E588C4601; Thu, 3 Jul 2003 09:40:00 +0200 (CEST) Date: Thu, 3 Jul 2003 09:40:00 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] Re: Bug in pdns_recursor (pdns 2.9.9) Message-ID: <20030703074000.GD8185@outpost.ds9a.nl> References: <200306232122.03144.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306232122.03144.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: Christof Meerwald cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 07:40:01 -0000 On Mon, Jun 23, 2003 at 09:21:54PM +0200, Norbert Sendetzky wrote: > To remove the warning, simply change the line to: > pthread_t pthread_self(void){return (pthread_t) 0;} Done. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Thu Jul 3 10:23:05 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 0DF0A18151 for ; Thu, 3 Jul 2003 10:23:05 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h638MxFB011141; Thu, 3 Jul 2003 10:22:59 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Thu, 3 Jul 2003 10:17:06 +0200 User-Agent: KMail/1.5.2 References: <200306281807.09484.norbert@linuxnetworks.de> <200306291422.12556.norbert@linuxnetworks.de> <20030703073427.GA8185@outpost.ds9a.nl> In-Reply-To: <20030703073427.GA8185@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200307031017.21528.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: AXFR list(): extended by target X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 08:23:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 03 July 2003 09:34, bert hubert wrote: > > Yes, they work as expected and described by me. Remember that > > allow-axfr-ips cannot overwrite disable-axfr=yes any more. > > Ok - so this is a change in documented behaviour? It seems so according to the diskussion one week ago. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8D5o8ACgkQxMLs5v5/7eDrYgCeKH4+x2rNIII2pGV3cp23U0Jb nPkAn25pxwZOa6CvJWT3r17owj0CRt0J =3FWO -----END PGP SIGNATURE----- From norbert@linuxnetworks.de Thu Jul 3 10:38:56 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 0ABE01812C for ; Thu, 3 Jul 2003 10:38:56 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h638csPZ004628; Thu, 3 Jul 2003 10:38:54 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Thu, 3 Jul 2003 10:35:38 +0200 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200307031035.40064.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] LDAP default-ttl option X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 08:38:56 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Something I forgot to mention: After applying the patch for DNS TTLs (contributed by Stefan=20 Pfetzing), there is a new option available: ldap-default-ttl (default: 86400): Sets the default time-to-life for all records retrieved from a LDAP=20 tree, which doesn't have a seperate dnsttl record. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8D6toACgkQxMLs5v5/7eBuKACeOhhSBxVL9RTLwXXrBVCAIpr4 oNUAn1uu/Xy4t8K2inou5nc11fBtgyQt =3DoHYj =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Thu Jul 3 10:43:00 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id E7AC01815B for ; Thu, 3 Jul 2003 10:43:00 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 4962F44FD; Thu, 3 Jul 2003 10:43:00 +0200 (CEST) Date: Thu, 3 Jul 2003 10:43:00 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030703084300.GA10668@outpost.ds9a.nl> References: <200307031035.40064.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200307031035.40064.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: LDAP default-ttl option X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 08:43:01 -0000 On Thu, Jul 03, 2003 at 10:35:38AM +0200, Norbert Sendetzky wrote: > ldap-default-ttl (default: 86400): > Sets the default time-to-life for all records retrieved from a LDAP > tree, which doesn't have a seperate dnsttl record. Fixed, thanks! pdns 2.9.10 is just around the corner now! Regards, bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Thu Jul 3 12:21:05 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id B20FD17F9F for ; Thu, 3 Jul 2003 12:21:05 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h63AL3c0029701; Thu, 3 Jul 2003 12:21:04 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Thu, 3 Jul 2003 12:17:33 +0200 User-Agent: KMail/1.5.2 References: <20030703093713.GB13145@outpost.ds9a.nl> In-Reply-To: <20030703093713.GB13145@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200307031217.38257.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: [Pdns-users] PowerDNS 2.9.10 released! X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 10:21:05 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 03 July 2003 11:37, bert hubert wrote: > Available on http://www.powerdns.com/downloads > Version 2.9.10 > > There has been a change in behaviour whereby disable-axfr does > what it means now! From now on, setting allow-axfr-ips > automatically disables AXFR from unmentioned subnets. Damn! The current release still contains the axfr bug (negation of if=20 statement). Norbert PS: Now I know what you meant in one of your last emails by asking if=20 it works: You wanted to know if the CVS version is working, but I=20 don't checkout sources from there. So the right answer had to be: my=20 suggested correction work, but it isn't in the CVS. Sorry! =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8EAsAACgkQxMLs5v5/7eA25QCgjbiC3yXXxsFjZSUwJuaFVQdc EGQAn2z3xpWvRdPiaVxJPNOg53k+FhBu =3DckHK =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Thu Jul 3 13:16:40 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id E002918140 for ; Thu, 3 Jul 2003 13:16:40 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 53CB24644; Thu, 3 Jul 2003 13:15:49 +0200 (CEST) Date: Thu, 3 Jul 2003 13:15:49 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030703111549.GA18920@outpost.ds9a.nl> References: <20030703093713.GB13145@outpost.ds9a.nl> <200307031217.38257.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200307031217.38257.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [Pdns-users] PowerDNS 2.9.10 released! X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 11:16:41 -0000 On Thu, Jul 03, 2003 at 12:17:33PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thursday 03 July 2003 11:37, bert hubert wrote: > > Available on http://www.powerdns.com/downloads > > Version 2.9.10 > > > > There has been a change in behaviour whereby disable-axfr does > > what it means now! From now on, setting allow-axfr-ips > > automatically disables AXFR from unmentioned subnets. > > Damn! The current release still contains the axfr bug (negation of if > statement). Very sure? I just committed. Can you recheck? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Thu Jul 3 13:43:34 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 54B8718163 for ; Thu, 3 Jul 2003 13:43:34 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h63BhVSn024341; Thu, 3 Jul 2003 13:43:31 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Thu, 3 Jul 2003 13:39:48 +0200 User-Agent: KMail/1.5.2 References: <20030703093713.GB13145@outpost.ds9a.nl> <200307031217.38257.norbert@linuxnetworks.de> <20030703111549.GA18920@outpost.ds9a.nl> In-Reply-To: <20030703111549.GA18920@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200307031340.00071.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: [Pdns-users] PowerDNS 2.9.10 released! X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 11:43:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 03 July 2003 13:15, bert hubert wrote: > > Damn! The current release still contains the axfr bug (negation > > of if statement). > > Very sure? I just committed. Can you recheck? Yes, I'm sure. It's still wrong in 2.9.10 and in ViewCVS/cvs co pdns Currently: static bool canDoAXFR(DNSPacket *q) { if(!arg().mustDo("disable-axfr")) // "!" is wrong! return false; Must be: static bool canDoAXFR(DNSPacket *q) { if(arg().mustDo("disable-axfr")) // No "!" here return false; Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8EFgQACgkQxMLs5v5/7eCgKwCgt7gJEYC3n2tM7O5TN9tSdP9h lHoAn1VEugATjv4pXLtFaNEA979RDjXV =fdqJ -----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Sat Jul 5 14:25:10 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 992CD1801D for ; Sat, 5 Jul 2003 14:25:10 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3D8CD4510; Sat, 5 Jul 2003 14:25:10 +0200 (CEST) Date: Sat, 5 Jul 2003 14:25:10 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] KEY Record Message-ID: <20030705122510.GB21209@outpost.ds9a.nl> References: <200306271919.02869.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306271919.02869.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2003 12:25:10 -0000 On Fri, Jun 27, 2003 at 07:19:00PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi > > I've tried to implement KEY records according to RFC 2535, but ran > into a problem: Try ethereal to look at your packet, it can be very enlightening. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Jul 5 15:03:02 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 08E181803D for ; Sat, 5 Jul 2003 15:03:02 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id DA6ED4510; Sat, 5 Jul 2003 15:03:01 +0200 (CEST) Date: Sat, 5 Jul 2003 15:03:01 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030705130301.GA22308@outpost.ds9a.nl> References: <200307011718.11118.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200307011718.11118.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: PowerLDAP DN extension X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2003 13:03:02 -0000 On Tue, Jul 01, 2003 at 05:18:05PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hi Bert >=20 > The file attached contains a patch to extend the PowerLDAP class to=20 > return DNs if necessary (required for the LDAP AXFR patch which will=20 > be coming soon). This patch doesn't compile here: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -D_GNU_SOURCE -Wall -O2 -c ldapbackend.cc -MT ldapbackend.lo -MD -MP -MF .deps/ldapbackend.TPlo -fPIC -DPIC -o .libs/ldapbackend.lo ldapbackend.cc: In member function =16irtual bool=20 LdapBackend::get(DNSResourceRecord&)': ldapbackend.cc:221: no matching function for call to =10owerLDAP::getSearchEntry (int&, std::map >, std::less,=20 std::allocator > > > >&)' powerldap.hh:37: candidates are: bool PowerLDAP::getSearchEntry(int,=20 std::map=20 >, std::less, std::allocator > > > >&, bool) I committed your patch to cvs, you could perhaps fix it from there? >=20 >=20 > Norbert >=20 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org >=20 > iEYEARECAAYFAj8BpjEACgkQxMLs5v5/7eB+xgCcC2dQ3G5hCruGCUspsLBRKoPX > Xe0An16ks5zGOIvt/rpfXhkp2LhBdZkY > =3D6Bwy > -----END PGP SIGNATURE----- --=20 http://www.PowerDNS.com Open source, database driven DNS Software=20 http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Jul 5 16:08:57 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 1A6C817F7A for ; Sat, 5 Jul 2003 16:08:57 +0200 (CEST) Received: from notebook.linuxnetworks.de (D5723.pppool.de [80.184.87.35]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h65E8sId010536; Sat, 5 Jul 2003 16:08:54 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 5 Jul 2003 16:03:42 +0200 User-Agent: KMail/1.5.2 References: <200307011718.11118.norbert@linuxnetworks.de> <20030705130301.GA22308@outpost.ds9a.nl> In-Reply-To: <20030705130301.GA22308@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_+qtB/VcJuARcTLp" Message-Id: <200307051603.46992.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: PowerLDAP DN extension X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2003 14:08:57 -0000 --Boundary-00=_+qtB/VcJuARcTLp Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 05 July 2003 15:03, bert hubert wrote: > > The file attached contains a patch to extend the PowerLDAP class > > to return DNs if necessary (required for the LDAP AXFR patch > > which will be coming soon). > > This patch doesn't compile here: Missing parameter. Fixed by attached diff. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8G2sEACgkQxMLs5v5/7eAE0wCgk2MRYABWJGXD74XmsUGU10Qo aasAn3Duc0b3ebkzcSUZZReyV6s9W+8Z =oWrN -----END PGP SIGNATURE----- --Boundary-00=_+qtB/VcJuARcTLp Content-Type: text/x-diff; charset="iso-8859-1"; name="dn_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dn_fix.diff" --- pdns/modules/ldapbackend/ldapbackend.cc Thu Jul 3 13:00:21 2003 +++ pdns-2.9.10/modules/ldapbackend/ldapbackend.cc Sat Jul 5 15:58:17 2003 @@ -223,7 +224,7 @@ m_result.erase( attribute ); } - if( m_pldap->getSearchEntry( m_msgid, m_result ) == true ) + if( m_pldap->getSearchEntry( m_msgid, m_result, false ) == true ) { if( m_result.find( "dNSTTL" ) != m_result.end() && m_result["dNSTTL"].size() > 0 ) { --Boundary-00=_+qtB/VcJuARcTLp-- From norbert@linuxnetworks.de Mon Jul 7 20:17:58 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id B110C18078 for ; Mon, 7 Jul 2003 20:17:58 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.180.190.NEFkom.net [212.114.180.190]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h67IHqqi008650; Mon, 7 Jul 2003 20:17:53 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 7 Jul 2003 20:15:59 +0200 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fjbC/KP+XAML1S5" Message-Id: <200307072016.00659.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] ldap patches - again X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 18:17:58 -0000 --Boundary-00=_fjbC/KP+XAML1S5 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Please apply the outstanding patches (attached below) to the current=20 source if you are not planning to release a new version in the next=20 few days. Especially the "list_target" patch is necessary for the new=20 LdapBackend AXFR code. Thanks Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8JuN8ACgkQxMLs5v5/7eC0VQCgp01zSgeHGmPHDSTt+8zqlS9b KvgAn2Y+VeTDp4xfcgP3Mavd9BCdbOyC =3DeF+X =2D----END PGP SIGNATURE----- --Boundary-00=_fjbC/KP+XAML1S5 Content-Type: text/x-diff; charset="iso-8859-15"; name="list_target.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="list_target.diff" diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.cc pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc --- pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Sat Jun 21 14:17:51 2003 +++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc Sat Jun 28 16:41:31 2003 @@ -60,8 +60,9 @@ } -bool LdapBackend::list( int domain_id ) +bool LdapBackend::list( const string &target, int domain_id ) { + L << Logger::Warning << backendname << " AXFR request for " << target << endl; L << Logger::Warning << backendname << " AXFR is not supported" << endl; return false; } diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.hh pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh --- pdns-2.9.9/modules/ldapbackend/ldapbackend.hh Sat Jun 21 14:16:38 2003 +++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh Sat Jun 28 16:41:31 2003 @@ -83,7 +83,7 @@ ~LdapBackend(); void lookup( const QType &qtype, const string &qdomain, DNSPacket *p=0, int zoneid=-1 ); - bool list( int domain_id ); + bool list( const string &target, int domain_id ); bool get( DNSResourceRecord &rr ); }; diff -ru pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc --- pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc Mon Jan 6 17:13:59 2003 +++ pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc Sat Jun 28 16:41:31 2003 @@ -103,7 +103,7 @@ d_qtype=qtype; } -bool MySQLBackend::list(int domain_id ) +bool MySQLBackend::list(const string &target, int domain_id ) { DLOG(L<Query(query); } -bool PdnsBackend::list(int inZoneId) +bool PdnsBackend::list(const string &target, int inZoneId) { //cout << "PdnsBackend::list" << endl; diff -ru pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh --- pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh Thu Mar 13 13:45:30 2003 +++ pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh Sat Jun 28 16:41:31 2003 @@ -18,7 +18,7 @@ ~PdnsBackend(); void lookup(const QType &, const string &qdomain, DNSPacket *p = 0, int zoneId = -1); - bool list(int inZoneId); + bool list(const string &target, int inZoneId); bool get(DNSResourceRecord& outRecord); bool getSOA(const string &name, SOAData &soadata); Only in pdns-2.9.9.list/modules/pipebackend: .deps Only in pdns-2.9.9.list/modules/pipebackend: Makefile diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.cc pdns-2.9.9.list/modules/pipebackend/pipebackend.cc --- pdns-2.9.9/modules/pipebackend/pipebackend.cc Mon Dec 16 14:04:27 2002 +++ pdns-2.9.9.list/modules/pipebackend/pipebackend.cc Sat Jun 28 16:41:31 2003 @@ -118,7 +118,7 @@ d_qname=qname; } -bool PipeBackend::list(int inZoneId) +bool PipeBackend::list(const string &target, int inZoneId) { try { d_disavow=false; diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.hh pdns-2.9.9.list/modules/pipebackend/pipebackend.hh --- pdns-2.9.9/modules/pipebackend/pipebackend.hh Wed Nov 27 16:31:59 2002 +++ pdns-2.9.9.list/modules/pipebackend/pipebackend.hh Sat Jun 28 16:41:31 2003 @@ -59,7 +59,7 @@ PipeBackend(const string &suffix=""); ~PipeBackend(); void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1); - bool list(int domain_id); + bool list(const string &target, int domain_id); bool get(DNSResourceRecord &r); static DNSBackend *maker(); diff -ru pdns-2.9.9/modules/xdbbackend/xdbbackend.cc pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc --- pdns-2.9.9/modules/xdbbackend/xdbbackend.cc Mon Dec 16 15:07:04 2002 +++ pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc Sat Jun 28 16:41:31 2003 @@ -30,7 +30,7 @@ delete d_db; } - bool list(int id) { + bool list(const string &target, int id) { return false; // we don't support AXFR (go away) } diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.cc pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc --- pdns-2.9.9/pdns/backends/bind/bindbackend.cc Fri Feb 28 12:43:25 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc Sat Jun 28 16:41:31 2003 @@ -756,7 +756,7 @@ return true; } -bool BindBackend::list(int id) +bool BindBackend::list(const string &target, int id) { if(!d_zone_id_map.count(id)) return false; diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.hh pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh --- pdns-2.9.9/pdns/backends/bind/bindbackend.hh Mon Feb 3 15:38:24 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh Sat Jun 28 16:41:31 2003 @@ -177,7 +177,7 @@ void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1); - bool list(int id); + bool list(const string &target, int id); bool get(DNSResourceRecord &); static DNSBackend *maker(); Only in pdns-2.9.9.list/pdns/backends/bind: bindbackend.hh.orig diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend2.cc pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc --- pdns-2.9.9/pdns/backends/bind/bindbackend2.cc Thu Mar 20 14:29:29 2003 +++ pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc Sat Jun 28 16:41:31 2003 @@ -726,7 +726,7 @@ return true; } -bool Bind2Backend::list(int id) +bool Bind2Backend::list(const string &target, int id) { cout<<"List of id "<list(sd.domain_id))) + if(!(this->list(domain, sd.domain_id))) throw AhuException("Backend error trying to determine magic serial number of zone '"+domain+"'"); while(this->get(i)) { diff -ru pdns-2.9.9/pdns/dnsbackend.hh pdns-2.9.9.list/pdns/dnsbackend.hh --- pdns-2.9.9/pdns/dnsbackend.hh Mon Feb 3 15:38:25 2003 +++ pdns-2.9.9.list/pdns/dnsbackend.hh Sat Jun 28 16:46:07 2003 @@ -80,7 +80,7 @@ if the backend does not consider itself responsible for the id passed. \param domain_id ID of which a list is requested */ - virtual bool list(int domain_id)=0; + virtual bool list(const string &target, int domain_id)=0; virtual ~DNSBackend(){}; diff -ru pdns-2.9.9/pdns/randombackend.cc pdns-2.9.9.list/pdns/randombackend.cc --- pdns-2.9.9/pdns/randombackend.cc Wed Nov 27 16:18:33 2002 +++ pdns-2.9.9.list/pdns/randombackend.cc Sat Jun 28 17:28:44 2003 @@ -34,7 +34,7 @@ d_ourname=getArg("hostname"); } - bool list(int id) { + bool list(const string &target, int id) { return false; // we don't support AXFR } diff -ru pdns-2.9.9/pdns/tcpreceiver.cc pdns-2.9.9.list/pdns/tcpreceiver.cc --- pdns-2.9.9/pdns/tcpreceiver.cc Sun Jun 22 13:11:41 2003 +++ pdns-2.9.9.list/pdns/tcpreceiver.cc Sat Jun 28 17:23:25 2003 @@ -246,7 +246,7 @@ static bool canDoAXFR(DNSPacket *q) { - if(!arg().mustDo("disable-axfr") + if(arg().mustDo("disable-axfr")) return false; if(arg()["allow-axfr-ips"].empty()) @@ -330,7 +330,7 @@ DNSBackend *B=sd.db; // get the RIGHT backend // now list zone - if(!(B->list(sd.domain_id))) { + if(!(B->list(target, sd.domain_id))) { L<setRcode(2); // 'SERVFAIL' sendDelPacket(outpacket,outsock); @@ -451,7 +451,7 @@ L< &); --Boundary-00=_fjbC/KP+XAML1S5 Content-Type: text/x-diff; charset="iso-8859-15"; name="stl_exception.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stl_exception.diff" --- pdns-2.9.8/modules/ldapbackend/ldapbackend.cc Fri Jun 6 14:43:50 2003 +++ pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Mon Jun 23 17:06:54 2003 @@ -148,9 +148,14 @@ L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = m_pldap->search( getArg("basedn"), filter, (const char**) attributes ); } - catch( LDAPException &e ) + catch( LDAPException &le ) { - L << Logger::Warning << backendname << " Unable to search LDAP directory: " << e.what() << endl; + L << Logger::Warning << backendname << " Unable to search LDAP directory: " << le.what() << endl; + return; + } + catch( exception &e ) + { + L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; return; } catch( ... ) @@ -239,9 +244,13 @@ goto Redo; } } - catch( LDAPException &e ) + catch( LDAPException &le ) + { + L << Logger::Warning << backendname << " Search failed: " << le.what() << endl; + } + catch( exception &e ) { - L << Logger::Warning << backendname << " Search failed: " << e.what() << endl; + L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; } catch( ... ) { --Boundary-00=_fjbC/KP+XAML1S5-- From norbert@linuxnetworks.de Wed Jul 23 13:42:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 4860B182A8 for ; Wed, 23 Jul 2003 13:42:35 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h6NBgVGX025246; Wed, 23 Jul 2003 13:42:32 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Wed, 23 Jul 2003 13:39:43 +0200 User-Agent: KMail/1.5.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_/PnH/mO2G588Cao" Message-Id: <200307231340.05770.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 11:42:35 -0000 --Boundary-00=_/PnH/mO2G588Cao Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The attached files implement AXFR support (master only) for the ldap=20 backend. They require the axfr-list patch posted by me two weeks=20 (IIRC) before. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8edAIACgkQxMLs5v5/7eAJDQCfcoetl5E0LdOviHhoiU0/fG48 2D0AnjXcATFGhvGxoGjpk9NedvNI/HoS =3DsvNV =2D----END PGP SIGNATURE----- --Boundary-00=_/PnH/mO2G588Cao Content-Type: text/x-c++src; charset="iso-8859-15"; name="ldapbackend.cc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.cc" /* * PowerDNS LDAP Backend * Copyright (C) 2003 Norbert Sendetzky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "ldapbackend.hh" static int Toupper(int c) { return toupper(c); } LdapBackend::LdapBackend( const string &suffix ) { m_msgid = 0; m_qname = ""; setArgPrefix( "ldap" + suffix ); m_default_ttl = (u_int32_t) strtol( getArg( "default-ttl" ).c_str(), NULL, 10 ); try { L << Logger::Info << backendname << " LDAP Server = " << getArg( "host" ) << ":" << getArg( "port" ) << endl; m_pldap = new PowerLDAP( getArg( "host" ), (u_int16_t) atoi( getArg( "port" ).c_str() ) ); m_pldap->simpleBind( getArg( "binddn" ), getArg( "secret" ) ); } catch( LDAPException &e ) { delete( m_pldap ); L << Logger::Error << backendname << " Ldap connection failed: " << e.what() << endl; throw( AhuException( "Unable to bind to ldap server" ) ); } L << Logger::Info << backendname << " Ldap connection succeeded" << endl; } LdapBackend::~LdapBackend() { delete( m_pldap ); L << Logger::Notice << backendname << " Ldap connection closed" << endl; } bool LdapBackend::list( const string &target, int domain_id ) { string filter, dn; char* attributes[] = { "associatedDomain", NULL }; try { L << Logger::Notice << backendname << " AXFR request for " << target << endl; // search for DN of SOA record which is SOA for target zone filter = "(&(associatedDomain=" + target + ")(SOARecord=*))"; m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); if( m_pldap->getSearchEntry( m_msgid, m_result, true ) == false ) { L << Logger::Error << backendname << " Unable to get SOA record for " << target << endl; return false; } if( m_result.empty() ) { L << Logger::Error << backendname << " No SOA record for " << target << endl; return false; } if( m_result.find( "dn" ) == m_result.end() ) { L << Logger::Error << backendname << " LDAP error while searching SOA record for " << target << endl; return false; } if( m_result["dn"].empty() ) { L << Logger::Error << backendname << " LDAP error while getting SOA record for " << target << endl; return false; } dn = m_result["dn"].front(); m_result.clear(); // list all records one level below but not entries containing SOA records (these are seperate zones) m_qname = ""; m_adomain = m_adomains.end(); // skip loops in get() first time filter = "(&(associatedDomain=*)(!(SOARecord=*)))"; m_msgid = m_pldap->search( dn, LDAP_SCOPE_ONELEVEL, filter, (const char**) attrany ); } catch( LDAPException &le ) { L << Logger::Error << backendname << " Unable to get zone " + target + " from LDAP directory: " << le.what() << endl; return false; } catch( exception &e ) { L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; return false; } catch( ... ) { L << Logger::Critical << backendname << " Caught unknown exception" << endl; return false; } return true; } void LdapBackend::lookup( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid ) { int len; vector parts; string filter, attr, qesc; char** attributes = attrany + 1; // skip associatedDomain char* attronly[] = { NULL, "dNSTTL", NULL }; try { m_qtype = qtype; m_qname = qname; qesc = m_pldap->escape( qname ); if( mustDo( "disable-ptrrecord" ) ) // PTRRecords will be derived from ARecords { len = qesc.length(); stringtok( parts, qesc, "." ); if( len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups { parts.pop_back(); parts.pop_back(); filter = "(aRecord=" + parts.back(); parts.pop_back(); while( !parts.empty() ) { filter += "." + parts.back(); parts.pop_back(); } filter += ")"; attronly[0] = "associatedDomain"; attributes = attronly; } else if( len > 9 && ( qesc.substr( len - 8, 8 ) == ".ip6.int" || qesc.substr( len - 9, 9 ) == ".ip6.arpa" ) ) // IPv6 reverse lookups { parts.pop_back(); parts.pop_back(); filter = "(aAAARecord=" + parts.back(); parts.pop_back(); while( !parts.empty() ) { filter += ":" + parts.back(); parts.pop_back(); } filter += ")"; attronly[0] = "associatedDomain"; attributes = attronly; } else // IPv4 and IPv6 lookups { filter = "(associatedDomain=" + qesc + ")"; if( qtype.getCode() != QType::ANY ) { attr = qtype.getName() + "Record"; filter = "(&" + filter + "(" + attr + "=*))"; attronly[0] = (char*) attr.c_str(); attributes = attronly; } } } else // requires additional ldap objects for reverse lookups { filter = "(associatedDomain=" + qesc + ")"; if( qtype.getCode() != QType::ANY ) { attr = qtype.getName() + "Record"; filter = "(&" + filter + "(" + attr + "=*))"; attronly[0] = (char*) attr.c_str(); attributes = attronly; } } m_adomain = m_adomains.end(); // skip loops in get() first time L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); } catch( LDAPException &le ) { L << Logger::Warning << backendname << " Unable to search LDAP directory: " << le.what() << endl; return; } catch( exception &e ) { L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; return; } catch( ... ) { L << Logger::Error << backendname << " Caught unknown exception" << endl; return; } } bool LdapBackend::get( DNSResourceRecord &rr ) { QType qt; vector parts; string attrname, content, qstr; try { do { do { while( m_adomain != m_adomains.end() ) { while( m_attribute != m_result.end() ) { attrname = m_attribute->first; qstr = attrname.substr( 0, attrname.length() - 6 ); // extract qtype string from ldap attribute name transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper ); qt = QType( const_cast(qstr.c_str()) ); while( m_value != m_attribute->second.end() ) { content = *m_value; rr.qtype = qt; rr.qname = *m_adomain; rr.priority = 0; rr.ttl = m_ttl; if( qt.getCode() == QType::MX ) // MX Record, e.g. 10 smtp.example.com { parts.clear(); stringtok( parts, content, " " ); if( parts.size() != 2) { L << Logger::Warning << backendname << " Invalid MX record without priority: " << content << endl; continue; } rr.priority = (u_int16_t) strtol( parts[0].c_str(), NULL, 10 ); content = parts[1]; } rr.content = content; m_value++; L << Logger::Info << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl; return true; } m_attribute++; m_value = m_attribute->second.begin(); } m_adomain++; m_attribute = m_result.begin(); m_value = m_attribute->second.begin(); } } while( !m_adomains.empty() && m_qname.empty() && mustDo( "disable-ptrrecord" ) && makePtrRecords() ); // make PTR records from associatedDomain entries m_result.clear(); } while( m_pldap->getSearchEntry( m_msgid, m_result, false ) && prepSearchEntry() ); } catch( LDAPException &le ) { L << Logger::Warning << backendname << " Search failed: " << le.what() << endl; } catch( exception &e ) { L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; } catch( ... ) { L << Logger::Error << backendname << " Caught unknown exception" << endl; } return false; } inline bool LdapBackend::prepSearchEntry() { m_adomains.clear(); m_ttl = m_default_ttl; if( m_result.find( "dNSTTL" ) != m_result.end() && !m_result["dNSTTL"].empty() ) { m_ttl = (u_int32_t) strtol( m_result["dNSTTL"][0].c_str(), NULL, 10 ); m_result.erase( "dNSTTL" ); } if( !m_qname.empty() ) // request was a normal lookup() { m_adomains.push_back( m_qname ); if( m_result.find( "associatedDomain" ) != m_result.end() ) { m_result["PTRRecord"] = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); } } else // request was a list() for AXFR { if( m_result.find( "associatedDomain" ) != m_result.end() ) { m_adomains = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); } } m_adomain = m_adomains.begin(); m_attribute = m_result.begin(); m_value = m_attribute->second.begin(); return true; } inline bool LdapBackend::makePtrRecords() { unsigned int i = 0; string ptrsrc; vector parts, tmp; vector::iterator record; char* attr[] = { "aRecord", "aAAARecord", NULL }; char* suffix[] = { ".in-addr.arpa", ".ip6.int", NULL }; char* seperator[] = { ".", ":", NULL }; tmp = m_adomains; m_adomains.clear(); while( attr[i] != NULL && m_result.find( attr[i] ) != m_result.end() ) { for( record = m_result[attr[i]].begin(); record != m_result[attr[i]].end(); record++ ) { parts.clear(); stringtok( parts, *record, seperator[i] ); ptrsrc = parts.back(); parts.pop_back(); while( !parts.empty() ) { ptrsrc += "." + parts.back(); parts.pop_back(); } ptrsrc += suffix[i]; m_adomains.push_back( ptrsrc ); } i++; } if( m_adomains.empty() ) { return false; } m_result.clear(); m_result["PTRRecord"] = tmp; m_adomain = m_adomains.begin(); m_attribute = m_result.begin(); m_value = m_attribute->second.begin(); return true; } class LdapFactory : public BackendFactory { public: LdapFactory() : BackendFactory( "ldap" ) {} void declareArguments( const string &suffix="" ) { declare( suffix, "host", "your ldap server","localhost" ); declare( suffix, "port", "ldap server port","389" ); declare( suffix, "basedn", "search root in ldap tree (must be set)","" ); declare( suffix, "binddn", "user dn for non anonymous binds","" ); declare( suffix, "secret", "user password for non anonymous binds", "" ); declare( suffix, "disable-ptrrecord", "disable necessity for seperate PTR records", "no" ); declare( suffix, "default-ttl", "default ttl if DNSTTL is not set", "86400" ); } DNSBackend* make( const string &suffix="" ) { return new LdapBackend( suffix ); } }; class Loader { public: Loader() { BackendMakers().report( new LdapFactory ); L << Logger::Notice << backendname << " This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl; } }; static Loader loader; --Boundary-00=_/PnH/mO2G588Cao Content-Type: text/x-c++hdr; charset="iso-8859-15"; name="ldapbackend.hh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.hh" /* * PowerDNS LDAP Backend * Copyright (C) 2003 Norbert Sendetzky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "powerldap.hh" #ifndef LDAPBACKEND_HH #define LDAPBACKEND_HH using namespace std; static string backendname="[LdapBackend]"; static char* attrany[] = { "associatedDomain", "dNSTTL", "aRecord", "nSRecord", "cNAMERecord", "pTRRecord", "mXRecord", "tXTRecord", "rPRecord", "aAAARecord", "lOCRecord", "nAPTRRecord", "aXFRRecord", NULL }; class LdapBackend : public DNSBackend { private: int m_msgid; u_int32_t m_ttl; u_int32_t m_default_ttl; QType m_qtype; string m_qname; PowerLDAP* m_pldap; PowerLDAP::sentry_t m_result; PowerLDAP::sentry_t::iterator m_attribute; vector::iterator m_value, m_adomain; vector m_adomains; bool prepSearchEntry(); bool makePtrRecords(); public: LdapBackend( const string &suffix="" ); ~LdapBackend(); void lookup( const QType &qtype, const string &qdomain, DNSPacket *p=0, int zoneid=-1 ); bool list( const string &target, int domain_id ); bool get( DNSResourceRecord &rr ); }; #endif /* LDAPBACKEND_HH */ --Boundary-00=_/PnH/mO2G588Cao-- From norbert@linuxnetworks.de Mon Aug 4 11:12:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 66E8B1802B for ; Mon, 4 Aug 2003 11:12:54 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h749CoLl025919; Mon, 4 Aug 2003 11:12:51 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 4 Aug 2003 11:12:20 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_0NiL/GAS2XV1hWp" Message-Id: <200308041112.21966.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] allow-axfr-ips X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2003 09:12:54 -0000 --Boundary-00=_0NiL/GAS2XV1hWp Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I've attached a patch to adept the description of allow-axfr-ips to=20 the new behaviour. =46urthermore I've seen that for disable-axfr two options are defined: =2D - arg().set("disable-axfr","Do not allow zone transfers")=3D"no"; =2D - arg().setSwitch("disable-axfr","Disable zonetransfers but do allow=20 TCP queries")=3D"no"; Why? Shouldn't we either set disable-axfr=3Dyes or set=20 allow-axfr-ips=3D127.0.0.1 by default for security reasons? Maybe=20 somebody could use AXFR requests of large zone to produce denial of=20 service attacks. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj8uI3QACgkQxMLs5v5/7eCQjwCgpSL7KF3wtlLtK+k0kWeqQ9R9 HsQAniMUyvGhmOoRZYK32rhUrLQYzYMj =3Dv9ZH =2D----END PGP SIGNATURE----- --Boundary-00=_0NiL/GAS2XV1hWp Content-Type: text/x-diff; charset="iso-8859-15"; name="allow_axfr_ips.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="allow_axfr_ips.diff" --- pdns/pdns/common_startup.cc Wed Mar 12 17:06:35 2003 +++ pdns-2.9.10/pdns/common_startup.cc Mon Aug 4 11:02:57 2003 @@ -75,7 +75,7 @@ arg().set("load-modules","Load this module - supply absolute or relative path")=""; arg().set("launch","Which backends to launch and order to query them in")=""; arg().setSwitch("disable-axfr","Disable zonetransfers but do allow TCP queries")="no"; - arg().set("allow-axfr-ips","If disabled, DO allow zonetransfers from these IP addresses")=""; + arg().set("allow-axfr-ips","Allow zonetransfers only from these IP addresses")=""; arg().set("slave-cycle-interval","Reschedule failed SOA serial checks once every .. seconds")="60"; arg().setSwitch("slave","Act as a slave")="no"; --Boundary-00=_0NiL/GAS2XV1hWp-- From ahu@outpost.ds9a.nl Fri Aug 22 20:12:24 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 973AF17F98 for ; Fri, 22 Aug 2003 20:12:24 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id D239B446A; Fri, 22 Aug 2003 15:34:10 +0200 (CEST) Date: Fri, 22 Aug 2003 15:34:10 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030822133410.GA12886@outpost.ds9a.nl> References: <200307231340.05770.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200307231340.05770.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2003 18:12:24 -0000 On Wed, Jul 23, 2003 at 01:39:43PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > The attached files implement AXFR support (master only) for the ldap > backend. They require the axfr-list patch posted by me two weeks > (IIRC) before. Merged, committed to cvs, can you check everything is as you intended it to be? thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Aug 23 12:38:18 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 3F3B61803B for ; Sat, 23 Aug 2003 12:38:18 +0200 (CEST) Received: from notebook.linuxnetworks.de (B01b0.pppool.de [213.7.1.176]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7NAc79m005835; Sat, 23 Aug 2003 12:38:16 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 23 Aug 2003 12:32:46 +0200 User-Agent: KMail/1.5.3 References: <200307231340.05770.norbert@linuxnetworks.de> <20030822133410.GA12886@outpost.ds9a.nl> In-Reply-To: <20030822133410.GA12886@outpost.ds9a.nl> MIME-Version: 1.0 Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308231225.51542.norbert@linuxnetworks.de> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 10:38:18 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 22 August 2003 15:34, bert hubert wrote: > > The attached files implement AXFR support (master only) for the > > ldap backend. They require the axfr-list patch posted by me two > > weeks (IIRC) before. > > Merged, committed to cvs, can you check everything is as you > intended it to be? A little problem which prevents the cvs version from compiling on my machine (using "fakeroot debian/rules binary-arch"): =2E./../libtool: ../../libtool: No such file or directory In Makefile libtool is defined as $(top_builddir)/libtool, which is=20 obviously wrong. Have you changed Makefiles and if yes, how can I fix=20 it? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9HQs4ACgkQxMLs5v5/7eDwlgCdG73oAhhKltRDQR7hv+uKPqzG 5ogAni2wC+GA7rMc24m/adolRKEeD4c9 =3D4NaW =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Sat Aug 23 12:46:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 39B8D1803B for ; Sat, 23 Aug 2003 12:46:35 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 09FD6444B; Sat, 23 Aug 2003 12:46:35 +0200 (CEST) Date: Sat, 23 Aug 2003 12:46:34 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030823104634.GA5827@outpost.ds9a.nl> References: <200307231340.05770.norbert@linuxnetworks.de> <20030822133410.GA12886@outpost.ds9a.nl> <200308231225.51542.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308231225.51542.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 10:46:35 -0000 On Sat, Aug 23, 2003 at 12:32:46PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Friday 22 August 2003 15:34, bert hubert wrote: > > > The attached files implement AXFR support (master only) for the > > > ldap backend. They require the axfr-list patch posted by me two > > > weeks (IIRC) before. > > > > Merged, committed to cvs, can you check everything is as you > > intended it to be? > > A little problem which prevents the cvs version from compiling on my > machine (using "fakeroot debian/rules binary-arch"): > ../../libtool: ../../libtool: No such file or directory > > In Makefile libtool is defined as $(top_builddir)/libtool, which is > obviously wrong. Have you changed Makefiles and if yes, how can I fix > it? I didn't change anything, this is probably due again to libtool/automake/autoconf version differences between you and me. I compile on Debian Woody. I'm not sure if that is obviously wrong, it appears obviously right. Good luck! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Aug 23 13:32:39 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 1186217FDA for ; Sat, 23 Aug 2003 13:32:39 +0200 (CEST) Received: from notebook.linuxnetworks.de (B041c.pppool.de [213.7.4.28]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7NBWZeG016126; Sat, 23 Aug 2003 13:32:36 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 23 Aug 2003 13:32:00 +0200 User-Agent: KMail/1.5.3 References: <200307231340.05770.norbert@linuxnetworks.de> <200308231225.51542.norbert@linuxnetworks.de> <20030823104634.GA5827@outpost.ds9a.nl> In-Reply-To: <20030823104634.GA5827@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308231332.15832.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 11:32:39 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 23 August 2003 12:46, bert hubert wrote: > > A little problem which prevents the cvs version from compiling on > > my machine (using "fakeroot debian/rules binary-arch"): > > ../../libtool: ../../libtool: No such file or directory > > > > In Makefile libtool is defined as $(top_builddir)/libtool, which > > is obviously wrong. Have you changed Makefiles and if yes, how > > can I fix it? > > I didn't change anything, this is probably due again to > libtool/automake/autoconf version differences between you and me. I > compile on Debian Woody. I use Debian Woody too but building 2.9.10 works as expected. My real problem probably is there: While running ./configure, an error occurs: make[1]: Entering directory `/home/nose/Project/pdns/pdns' make[1]: *** No rule to make target `ltmain.sh'. Stop. make[1]: Leaving directory `/home/nose/Project/pdns/pdns' This prevents the creation of libtool in top_builddir. I've copied=20 ltmain.sh from 2.9.10 to the cvs version and now it works, but I=20 don't know why the file is missing. I did a clean checkout of all=20 sources yesterday. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEUEARECAAYFAj9HULEACgkQxMLs5v5/7eBx1gCYpUASYoUiCZShDuaJ6LmDi54e awCfeEio3zDmuuYAgI5YlI9/5me9ABs=3D =3DfrEE =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sat Aug 23 14:49:18 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id CE87717F7F for ; Sat, 23 Aug 2003 14:49:18 +0200 (CEST) Received: from notebook.linuxnetworks.de (B03eb.pppool.de [213.7.3.235]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7NCnDx0023804; Sat, 23 Aug 2003 14:49:14 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 23 Aug 2003 14:36:25 +0200 User-Agent: KMail/1.5.3 References: <200307231340.05770.norbert@linuxnetworks.de> <20030822133410.GA12886@outpost.ds9a.nl> In-Reply-To: <20030822133410.GA12886@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_J/1R/pZx24VXYk7" Message-Id: <200308231436.30639.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 12:49:19 -0000 --Boundary-00=_J/1R/pZx24VXYk7 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 22 August 2003 15:34, bert hubert wrote: > > The attached files implement AXFR support (master only) for the > > ldap backend. They require the axfr-list patch posted by me two > > weeks (IIRC) before. > > Merged, committed to cvs, can you check everything is as you > intended it to be? Yep, works as (formerly) intended, but I fear Bind and other=20 nameservers will be confused if they get the zone and the reverse=20 zone all in once. The patch attached below against 2.9.11 fixes this behaviour and=20 provides the behaviour expected by other name servers. Additionally,=20 there are some code improvements in the diffs included Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9HX8kACgkQxMLs5v5/7eCMeQCglHgebZ1bTvDY6OYMZtac6Fy+ zqwAnib5K12XxkIf7t/Q2mCPcB4KjOb6 =3DsOsp =2D----END PGP SIGNATURE----- --Boundary-00=_J/1R/pZx24VXYk7 Content-Type: text/x-diff; charset="iso-8859-1"; name="ldapbackend.cc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.cc.diff" --- pdns-2.9.11/modules/ldapbackend/ldapbackend.cc Fri Aug 22 15:02:23 2003 +++ pdns-2.9.10.nose/modules/ldapbackend/ldapbackend.cc Wed Aug 20 14:30:51 2003 @@ -83,24 +83,12 @@ return false; } - if( m_result.empty() ) + if( m_result.empty() || m_result.find( "dn" ) == m_result.end() || m_result["dn"].empty() ) { L << Logger::Error << backendname << " No SOA record for " << target << endl; return false; } - if( m_result.find( "dn" ) == m_result.end() ) - { - L << Logger::Error << backendname << " LDAP error while searching SOA record for " << target << endl; - return false; - } - - if( m_result["dn"].empty() ) - { - L << Logger::Error << backendname << " LDAP error while getting SOA record for " << target << endl; - return false; - } - dn = m_result["dn"].front(); m_result.clear(); @@ -108,7 +96,7 @@ m_qname = ""; m_adomain = m_adomains.end(); // skip loops in get() first time - filter = "(&(associatedDomain=*)(!(SOARecord=*)))"; + filter = "(&(associatedDomain=*" + target + ")(!(SOARecord=*)))"; m_msgid = m_pldap->search( dn, LDAP_SCOPE_ONELEVEL, filter, (const char**) attrany ); } catch( LDAPException &le ) @@ -151,37 +139,15 @@ len = qesc.length(); stringtok( parts, qesc, "." ); - if( len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups + if( parts.size() == 6 && len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups { - parts.pop_back(); - parts.pop_back(); - - filter = "(aRecord=" + parts.back(); - parts.pop_back(); - while( !parts.empty() ) - { - filter += "." + parts.back(); - parts.pop_back(); - } - filter += ")"; - + filter = name2filter( parts, "aRecord", "." ); attronly[0] = "associatedDomain"; attributes = attronly; } - else if( len > 9 && ( qesc.substr( len - 8, 8 ) == ".ip6.int" || qesc.substr( len - 9, 9 ) == ".ip6.arpa" ) ) // IPv6 reverse lookups + else if( parts.size() == 10 && len > 9 && ( qesc.substr( len - 8, 8 ) == ".ip6.int" ) ) // IPv6 reverse lookups { - parts.pop_back(); - parts.pop_back(); - - filter = "(aAAARecord=" + parts.back(); - parts.pop_back(); - while( !parts.empty() ) - { - filter += ":" + parts.back(); - parts.pop_back(); - } - filter += ")"; - + filter = name2filter( parts, "aAAARecord", ":" ); attronly[0] = "associatedDomain"; attributes = attronly; } @@ -242,61 +208,56 @@ { do { - do + while( m_adomain != m_adomains.end() ) { - while( m_adomain != m_adomains.end() ) + while( m_attribute != m_result.end() ) { - while( m_attribute != m_result.end() ) + attrname = m_attribute->first; + qstr = attrname.substr( 0, attrname.length() - 6 ); // extract qtype string from ldap attribute name + transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper ); + qt = QType( const_cast(qstr.c_str()) ); + + while( m_value != m_attribute->second.end() ) { - attrname = m_attribute->first; - qstr = attrname.substr( 0, attrname.length() - 6 ); // extract qtype string from ldap attribute name - transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper ); - qt = QType( const_cast(qstr.c_str()) ); + content = *m_value; - while( m_value != m_attribute->second.end() ) - { - content = *m_value; + rr.qtype = qt; + rr.qname = *m_adomain; + rr.priority = 0; + rr.ttl = m_ttl; - rr.qtype = qt; - rr.qname = *m_adomain; - rr.priority = 0; - rr.ttl = m_ttl; + if( qt.getCode() == QType::MX ) // MX Record, e.g. 10 smtp.example.com + { + parts.clear(); + stringtok( parts, content, " " ); - if( qt.getCode() == QType::MX ) // MX Record, e.g. 10 smtp.example.com + if( parts.size() != 2) { - parts.clear(); - stringtok( parts, content, " " ); - - if( parts.size() != 2) - { - L << Logger::Warning << backendname << " Invalid MX record without priority: " << content << endl; - continue; - } - - rr.priority = (u_int16_t) strtol( parts[0].c_str(), NULL, 10 ); - content = parts[1]; + L << Logger::Warning << backendname << " Invalid MX record without priority: " << content << endl; + continue; } - rr.content = content; - m_value++; - - L << Logger::Info << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl; - return true; + rr.priority = (u_int16_t) strtol( parts[0].c_str(), NULL, 10 ); + content = parts[1]; } - m_attribute++; - m_value = m_attribute->second.begin(); + rr.content = content; + m_value++; + + L << Logger::Info << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl; + return true; } - m_adomain++; - m_attribute = m_result.begin(); + + m_attribute++; m_value = m_attribute->second.begin(); } + m_adomain++; + m_attribute = m_result.begin(); + m_value = m_attribute->second.begin(); } - while( !m_adomains.empty() && m_qname.empty() && mustDo( "disable-ptrrecord" ) && makePtrRecords() ); // make PTR records from associatedDomain entries - m_result.clear(); } - while( m_pldap->getSearchEntry( m_msgid, m_result, false ) && prepSearchEntry() ); + while( m_pldap->getSearchEntry( m_msgid, m_result, false ) && prepareEntry() ); } catch( LDAPException &le ) @@ -316,7 +277,26 @@ } -inline bool LdapBackend::prepSearchEntry() +inline string LdapBackend::name2filter( vector& parts, string record, string separator ) +{ + string filter; + parts.pop_back(); + parts.pop_back(); + + filter = "(" + record + "=" + parts.back(); + parts.pop_back(); + while( !parts.empty() ) + { + filter += separator + parts.back(); + parts.pop_back(); + } + filter += ")"; + + return filter; +} + + +inline bool LdapBackend::prepareEntry() { m_adomains.clear(); m_ttl = m_default_ttl; @@ -351,58 +331,6 @@ return true; } - - -inline bool LdapBackend::makePtrRecords() -{ - unsigned int i = 0; - string ptrsrc; - vector parts, tmp; - vector::iterator record; - char* attr[] = { "aRecord", "aAAARecord", NULL }; - char* suffix[] = { ".in-addr.arpa", ".ip6.int", NULL }; - char* seperator[] = { ".", ":", NULL }; - - - tmp = m_adomains; - m_adomains.clear(); - - while( attr[i] != NULL && m_result.find( attr[i] ) != m_result.end() ) - { - for( record = m_result[attr[i]].begin(); record != m_result[attr[i]].end(); record++ ) - { - parts.clear(); - stringtok( parts, *record, seperator[i] ); - - ptrsrc = parts.back(); - parts.pop_back(); - while( !parts.empty() ) - { - ptrsrc += "." + parts.back(); - parts.pop_back(); - } - ptrsrc += suffix[i]; - - m_adomains.push_back( ptrsrc ); - } - - i++; - } - - if( m_adomains.empty() ) - { - return false; - } - - m_result.clear(); - m_result["PTRRecord"] = tmp; - m_adomain = m_adomains.begin(); - m_attribute = m_result.begin(); - m_value = m_attribute->second.begin(); - - return true; -} - class LdapFactory : public BackendFactory --Boundary-00=_J/1R/pZx24VXYk7 Content-Type: text/x-diff; charset="iso-8859-1"; name="ldapbackend.hh.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.hh.diff" --- pdns-2.9.11/modules/ldapbackend/ldapbackend.hh Fri Aug 22 15:02:16 2003 +++ pdns-2.9.10.nose/modules/ldapbackend/ldapbackend.hh Wed Aug 20 14:20:09 2003 @@ -74,16 +74,16 @@ int m_msgid; u_int32_t m_ttl; u_int32_t m_default_ttl; - QType m_qtype; string m_qname; + QType m_qtype; PowerLDAP* m_pldap; PowerLDAP::sentry_t m_result; PowerLDAP::sentry_t::iterator m_attribute; vector::iterator m_value, m_adomain; vector m_adomains; - bool prepSearchEntry(); - bool makePtrRecords(); + bool prepareEntry(); + string name2filter( vector& parts, string record, string separator ); public: --Boundary-00=_J/1R/pZx24VXYk7-- From cmeerw@web.de Sun Aug 24 18:14:32 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id BD4AD17FFA for ; Sun, 24 Aug 2003 18:14:32 +0200 (CEST) Received: from pam.utanet.at ([213.90.36.6]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19qxVb-0002ki-00 for pdns-dev@mailman.powerdns.com; Sun, 24 Aug 2003 18:14:27 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by pam.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19qxVb-0003ln-00 for pdns-dev@mailman.powerdns.com; Sun, 24 Aug 2003 18:14:27 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19qxUx-0001x2-Dr for pdns-dev@mailman.powerdns.com; Sun, 24 Aug 2003 18:13:47 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20030807205314.GA10113@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 Resent-From: cmeerw@web.de Resent-Date: Sun, 24 Aug 2003 18:13:47 +0200 Resent-To: pdns-dev@mailman.powerdns.com Resent-Message-Id: Subject: [Pdns-dev] bindbackend: parsing of SRV records X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 24 Aug 2003 16:14:32 -0000 X-Original-Date: Thu, 7 Aug 2003 22:53:14 +0200 X-List-Received-Date: Sun, 24 Aug 2003 16:14:32 -0000 Hi, there is a bug in the parsing of SRV records in the bindbackend. See RFC 2782 for the format of SRV records: "Here is the format of the SRV RR, whose DNS type code is 33: _Service._Proto.Name TTL Class SRV Priority Weight Port Target" But pdns's current parser leaves out the priority field and assumes a SRV record looks something like: _Service._Proto.Name TTL Class SRV Weight Port Target Here is a small fix: --- pdns-2.9.10.orig/pdns/backends/bind/zoneparser2.cc +++ pdns-2.9.10/pdns/backends/bind/zoneparser2.cc @@ -529,9 +529,13 @@ int left=words.size()-cpos; string content; - if(qtype=="MX" && left==2) { - int prio=atoi(words[cpos++].c_str()); - content=words[cpos]; + if((qtype=="MX" && left==2) || (qtype=="SRV" && left==4)){ + int prio=atoi(words[cpos++].c_str());left--; + content=words[cpos++];left--; + + while(left--) + content+=" "+words[cpos++]; + if(content=="@") content=d_origin; else bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Wed Aug 27 12:30:48 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from smtp.codingtechnologies.de (smtp.codingtechnologies.de [62.128.13.236]) by spoon.powerdns.com (Postfix) with ESMTP id D710517FA4 for ; Wed, 27 Aug 2003 12:30:48 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by smtp.codingtechnologies.de (Coding Technologies Mail) with ESMTP id 1DA9A19AB; Wed, 27 Aug 2003 12:29:06 +0200 (CEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Wed, 27 Aug 2003 12:28:38 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_WfIT/AUGuHjfL/t" Message-Id: <200308271228.57478.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] netmasks X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 10:30:49 -0000 --Boundary-00=_WfIT/AUGuHjfL/t Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert There is a bug in the code to match netmasks which causes a netmask of=20 0.0.0.0/0 to fail (for allow-axfr-ips and allow-recursion).=20 =46urthermore I did some code cleanups and improvements: =2D - set allow-axfr-ips and allow-recursion to 0.0.0.0/0 by default =2D - speedup AXFR check in TCPNameserver =2D - remove (now) unused matchNetmask() in misc.cc Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9Mh9cACgkQxMLs5v5/7eAIagCgtWT8xtGXujj4yqIQ+sXDG1t+ RH8AoKrqVEFRBbWV99g5A2oARtEEBCKR =3Dc9w/ =2D----END PGP SIGNATURE----- --Boundary-00=_WfIT/AUGuHjfL/t Content-Type: text/x-diff; charset="iso-8859-15"; name="netmasks.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="netmasks.diff" Only in pdns-2.9.11/pdns: .deps Only in pdns-2.9.11/pdns: Makefile Only in pdns-2.9.11/pdns/backends: Makefile Only in pdns-2.9.11/pdns/backends/bind: .deps Only in pdns-2.9.11/pdns/backends/bind: Makefile Only in pdns-2.9.11/pdns/backends/bind: zone2ldap.cc.new diff -ru pdns-2.9.11.orig/pdns/common_startup.cc pdns-2.9.11/pdns/common_startup.cc --- pdns-2.9.11.orig/pdns/common_startup.cc Fri Aug 22 14:51:55 2003 +++ pdns-2.9.11/pdns/common_startup.cc Wed Aug 27 12:03:53 2003 @@ -65,7 +65,7 @@ arg().set("queue-limit","Maximum number of milliseconds to queue a query")="1500"; arg().set("recursor","If recursion is desired, IP address of a recursing nameserver")="no"; arg().set("lazy-recursion","Only recurse if question cannot be answered locally")="yes"; - arg().set("allow-recursion","List of netmasks that are allowed to recurse")=""; + arg().set("allow-recursion","List of subnets that are allowed to recurse")="0.0.0.0/0"; arg().set("disable-tcp","Do not listen to TCP queries")="no"; arg().set("disable-axfr","Do not allow zone transfers")="no"; @@ -75,7 +75,7 @@ arg().set("load-modules","Load this module - supply absolute or relative path")=""; arg().set("launch","Which backends to launch and order to query them in")=""; arg().setSwitch("disable-axfr","Disable zonetransfers but do allow TCP queries")="no"; - arg().set("allow-axfr-ips","Allow zonetransfers only from these IP addresses")=""; + arg().set("allow-axfr-ips","Allow zonetransfers only to these subnets")="0.0.0.0/0"; arg().set("slave-cycle-interval","Reschedule failed SOA serial checks once every .. seconds")="60"; arg().setSwitch("slave","Act as a slave")="no"; diff -ru pdns-2.9.11.orig/pdns/dnsproxy.cc pdns-2.9.11/pdns/dnsproxy.cc --- pdns-2.9.11.orig/pdns/dnsproxy.cc Mon Jan 27 13:55:48 2003 +++ pdns-2.9.11/pdns/dnsproxy.cc Wed Aug 27 10:59:20 2003 @@ -94,7 +94,7 @@ bool DNSProxy::recurseFor(DNSPacket* p) { - return d_ng.empty() || d_ng.match((struct sockaddr_in *)&p->remote); + return d_ng.match((struct sockaddr_in *)&p->remote); } /** returns false if p->remote is not allowed to recurse via us */ diff -ru pdns-2.9.11.orig/pdns/iputils.hh pdns-2.9.11/pdns/iputils.hh --- pdns-2.9.11.orig/pdns/iputils.hh Wed Nov 27 16:18:33 2002 +++ pdns-2.9.11/pdns/iputils.hh Wed Aug 27 11:16:48 2003 @@ -55,7 +55,7 @@ if((p=strchr(mask.c_str(),'/'))) bits=atoi(p+1); - d_mask=~((1<<(32-bits))-1); // 1<<16 0000 0000 0000 0000 0000 0000 0000 0000 + d_mask=~(0xFFFFFFFF>>bits); struct in_addr a; if(!Utility::inet_aton(mask.substr(0,p-mask.c_str()).c_str(), &a)) diff -ru pdns-2.9.11.orig/pdns/logger.cc pdns-2.9.11/pdns/logger.cc --- pdns-2.9.11.orig/pdns/logger.cc Mon Dec 9 17:22:22 2002 +++ pdns-2.9.11/pdns/logger.cc Tue Aug 26 16:19:05 2003 @@ -42,6 +42,7 @@ clog< 0xffffffff - // bits==16 -> 0xffff0000 - // bits==0 -> 0x00000000 - unsigned int bmask=~((1<<(32-bits))-1); // 1<<16 0000 0000 0000 0000 0000 0000 0000 0000 - - /* - fprintf(stderr,"%x\n",bmask); - fprintf(stderr,"%x\n",(htonl((unsigned int)a.s_addr) & bmask)); - fprintf(stderr,"%x\n",(htonl((unsigned int)m.s_addr) & bmask)); - */ - - return ((htonl((unsigned int)a.s_addr) & bmask) == (htonl((unsigned int)m.s_addr) & bmask)); -} int waitForData(int fd, int seconds) { diff -ru pdns-2.9.11.orig/pdns/misc.hh pdns-2.9.11/pdns/misc.hh --- pdns-2.9.11.orig/pdns/misc.hh Fri Feb 7 13:17:01 2003 +++ pdns-2.9.11/pdns/misc.hh Wed Aug 27 12:27:17 2003 @@ -45,7 +45,6 @@ bool endsOn(const string &domain, const string &suffix); string nowTime(); const string unquotify(const string &item); -int matchNetmask(const char *address, const char *omask); string humanDuration(time_t passed); void chomp(string &line, const string &delim); bool stripDomainSuffix(string *qname, const string &domain); Only in pdns-2.9.11/pdns: pdns diff -ru pdns-2.9.11.orig/pdns/tcpreceiver.cc pdns-2.9.11/pdns/tcpreceiver.cc --- pdns-2.9.11.orig/pdns/tcpreceiver.cc Fri Aug 22 15:08:02 2003 +++ pdns-2.9.11/pdns/tcpreceiver.cc Wed Aug 27 12:04:58 2003 @@ -53,6 +53,7 @@ Semaphore *TCPNameserver::d_connectionroom_sem; PacketHandler *TCPNameserver::s_P; int TCPNameserver::s_timeout; +NetmaskGroup TCPNameserver::d_ng; int TCPNameserver::sendDelPacket(DNSPacket *p, int outsock) @@ -164,7 +165,7 @@ break; if(packet->qtype.getCode()==QType::AXFR) { - if(doAXFR(packet->qdomain, packet, fd)) + if(doAXFR(packet->qdomain, packet, fd)) S.inc("tcp-answers"); continue; } @@ -244,25 +245,17 @@ return 0; } -static bool canDoAXFR(DNSPacket *q) +bool TCPNameserver::canDoAXFR(DNSPacket *q) { if(arg().mustDo("disable-axfr")) return false; - if(arg()["allow-axfr-ips"].empty()) + if( d_ng.match( (struct sockaddr_in *) &q->remote ) ) return true; - - vectorparts; - stringtok(parts,arg()["allow-axfr-ips"],", "); // is this IP on the guestlist? - for(vector::const_iterator i=parts.begin();i!=parts.end();++i) { - if(matchNetmask(q->getRemote().c_str(),i->c_str())==1) - return true; - } - extern CommunicatorClass Communicator; - if(Communicator.justNotified(q->qdomain, q->getRemote())) { // we just notified this ip + if(Communicator.justNotified(q->qdomain, q->getRemote())) { // we just notified this ip L<qdomain<<"' from recently notified slave "<getRemote()<getRemote()<replyPacket(); - outpacket->setRcode(RCode::Refused); + outpacket->setRcode(RCode::Refused); // FIXME: should actually figure out if we are auth over a zone, and send out 9 if we aren't sendDelPacket(outpacket,outsock); return 0; @@ -286,16 +279,16 @@ L<getRemote()<replyPacket(); - DNSResourceRecord soa; + DNSResourceRecord soa; DNSResourceRecord rr; SOAData sd; sd.db=(DNSBackend *)-1; // force uncached answer { Lock l(&s_plock); - + // find domain_id via SOA and list complete domain. No SOA, no AXFR - + DLOG(L<<"Looking for SOA"<getBackend()->getSOA(target,sd)) { @@ -317,7 +310,7 @@ soa.ttl=sd.default_ttl; soa.domain_id=sd.domain_id; soa.d_place=DNSResourceRecord::ANSWER; - + if(!sd.db || sd.db==(DNSBackend *)-1) { L<setRcode(RCode::ServFail); @@ -407,6 +400,12 @@ throw AhuException("No local address specified"); d_highfd=0; + + vector parts; + stringtok( parts, arg()["allow-axfr-ips"], ", \t" ); // is this IP on the guestlist? + for( vector::const_iterator i = parts.begin(); i != parts.end(); ++i ) { + d_ng.addMask( *i ); + } #ifndef WIN32 signal(SIGPIPE,SIG_IGN); diff -ru pdns-2.9.11.orig/pdns/tcpreceiver.hh pdns-2.9.11/pdns/tcpreceiver.hh --- pdns-2.9.11.orig/pdns/tcpreceiver.hh Wed Nov 27 16:18:31 2002 +++ pdns-2.9.11/pdns/tcpreceiver.hh Wed Aug 27 11:44:34 2003 @@ -20,6 +20,7 @@ #define PDNS_TCPRECEIVER_HH #include "dns.hh" +#include "iputils.hh" #include "dnsbackend.hh" #include "packethandler.hh" #include @@ -50,6 +51,7 @@ static int readLength(int fd, struct sockaddr_in *remote); static void getQuestion(int fd, char *mesg, int pktlen, const struct sockaddr_in &remote); static int doAXFR(const string &target, DNSPacket *q, int outsock); + static bool canDoAXFR(DNSPacket *q); static void *doConnection(void *data); static void *launcher(void *data); void thread(void); @@ -57,6 +59,7 @@ static PacketHandler *s_P; pthread_t d_tid; static Semaphore *d_connectionroom_sem; + static NetmaskGroup d_ng; vectord_sockets; int d_highfd; --Boundary-00=_WfIT/AUGuHjfL/t-- From norbert@linuxnetworks.de Wed Aug 27 14:03:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from smtp.codingtechnologies.de (smtp.codingtechnologies.de [62.128.13.236]) by spoon.powerdns.com (Postfix) with ESMTP id C91161824E; Wed, 27 Aug 2003 14:03:35 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by smtp.codingtechnologies.de (Coding Technologies Mail) with ESMTP id 001F319AD; Wed, 27 Aug 2003 14:01:52 +0200 (CEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS User Date: Wed, 27 Aug 2003 14:01:42 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308271401.43977.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] loglevel option X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 12:03:36 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all I've seen that the loglevel option specifies how much is logged to the=20 console (is this true?) instead of limiting the amount of information=20 logged to the syslog. Is there a possibility to sort out INFO and=20 WARNING messages from being written to the syslog? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9MnaYACgkQxMLs5v5/7eDfgACeKhVnWFxOqQuEaoSrnSPX5JWh DpgAn3NMgRFO3mnIN6fhNC1XUgsBOhHW =3D1ezk =2D----END PGP SIGNATURE----- From joostvb@mdcc.cx Thu Aug 28 14:27:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from topaz.ad1810.com (topaz.ad1810.com [212.204.230.141]) by spoon.powerdns.com (Postfix) with ESMTP id C4DE417F91 for ; Thu, 28 Aug 2003 14:27:54 +0200 (CEST) Received: from a25011.upc-a.chello.nl ([62.163.25.11] helo=yosida.mdcc.cx ident=qmailr) by topaz.ad1810.com with asmtp (Cipher TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1 (Debian)) id 19sLsX-0000cd-00 for ; Thu, 28 Aug 2003 14:27:54 +0200 Received: (qmail 24977 invoked from network); 28 Aug 2003 12:27:52 -0000 Received: from nagy.mdcc.cx (qmailr@192.168.26.30) by yosida.mdcc.cx with SMTP; 28 Aug 2003 12:27:52 -0000 Received: (qmail 15456 invoked by uid 1000); 28 Aug 2003 12:27:47 -0000 Date: Thu, 28 Aug 2003 14:27:47 +0200 From: Joost van Baal To: PowerDNS devel List Message-ID: <20030828122747.GU22994@nagy.mdcc.cx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2F7AbV2suvT8PGoH" Content-Disposition: inline X-PGP-Fingerprint: 8FC6 A40E 31B8 7E0E 2270 D7A9 0606 9CF2 9694 57F0 X-PGP-Key-ID: 0x969457F0 X-PGP-Key: http://mdcc.cx/~joostvb/joostvb_key.asc X-Accept-Language: nl, en User-Agent: Mutt/1.5.4i Subject: [Pdns-dev] bind backend as slave segfaults on OpenBSD 3.3 X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 12:27:55 -0000 --2F7AbV2suvT8PGoH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Using the bind backend as a slave on OpenBSD 3.3, with gcc 2.95.3, causes pdns_server to segfault in ZoneParser::eatLine at backends/bind/zoneparser2.cc:236 . Any clue on how to get this fixed would be greatly appreciated. Here are the details: root@schilow.mdcc.cx:~# /usr/local/sbin/pdns_server --config-name=3Dext Aug 28 13:34:44 schilow [3867]: [BindBackend] This is the bind backend ver= sion 2.9.11 (Aug 28 2003, 12:54:51) reporting Aug 28 13:34:44 schilow [3867]: [Bind2Backend] This is the bind backend ve= rsion 2.9.11 (Aug 28 2003, 12:52:16) reporting Aug 28 13:34:44 This is a standalone pdns Aug 28 13:34:45 schilow pdns-ext[3867]: This is a standalone pdns Aug 28 13:34:45 Listening on controlsocket in '/var/run/pdns-ext.controlso= cket' Aug 28 13:34:45 schilow pdns-ext[3867]: Listening on controlsocket in '/va= r/run/pdns-ext.controlsocket' Aug 28 13:34:45 Opened file '/usr/local/etc/pdns-ext.conf' for configurati= on Aug 28 13:34:45 UDP server bound to 80.126.189.155:53 Aug 28 13:34:45 TCP server bound to 80.126.189.155:53 Aug 28 13:34:45 schilow pdns[3867]: UDP server bound to 80.126.189.155:53 Aug 28 13:34:45 schilow pdns[3867]: UDP server bound to 80.126.189.155:53 Aug 28 13:34:45 schilow pdns[3867]: TCP server bound to 80.126.189.155:53 Aug 28 13:34:45 schilow pdns[3867]: TCP server bound to 80.126.189.155:53 Aug 28 13:34:45 PowerDNS 2.9.11 (C) 2001-2003 PowerDNS.COM BV (Aug 28 2003= , 12:47:14) starting up Aug 28 13:34:45 schilow pdns[3867]: PowerDNS 2.9.11 (C) 2001-2003 PowerDNS= =2ECOM BV (Aug 28 2003, 12:47:14) starting up Aug 28 13:34:45 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free s= oftware, and you are welcome to redistribute it according to the terms of t= he GPL version 2. Aug 28 13:34:45 schilow pdns[3867]: PowerDNS comes with ABSOLUTELY NO WARR= ANTY. This is free software, and you are welcome to redistribute it accordi= ng to the terms of the GPL version 2. Aug 28 13:34:45 Creating backend connection for TCP Aug 28 13:34:45 schilow pdns[3867]: Creating backend connection for TCP Aug 28 13:34:45 schilow pdns[3867]: Creating backend connection for TCP Aug 28 13:34:45 [bindbackend] Parsing 1 domain(s), will report when done Aug 28 13:34:45 schilow pdns[3867]: [bindbackend] Parsing 1 domain(s), wil= l report when done Aug 28 13:34:45 [bindbackend] parsing 'mdcc.cx' from file '/usr/local/var/= named/slave/mdcc.cx' Aug 28 13:34:46 Master/slave communicator launching Aug 28 13:34:46 schilow pdns[3867]: Master/slave communicator launching Aug 28 13:34:46 schilow pdns[3867]: Master/slave communicator launching zsh: segmentation fault (core dumped) /usr/local/sbin/pdns_server --confi= g-name=3Dext This is with joostvb@schilow.mdcc.cx:~% egrep -v '^#|^$' /usr/local/etc/pdns-ext.conf local-address=3D80.126.189.155 bind-config=3D/usr/local/etc/bind/ext/named.conf slave=3Dyes bind-check-interval=3D0 disable-axfr=3Dyes launch=3Dbind log-dns-details=3Dyes log-failed-updates=3Dyes logging-facility=3D4 loglevel=3D9 joostvb@schilow.mdcc.cx:~% cat /usr/local/etc/bind/ext/named.conf zone "mdcc.cx" { type slave; file "/usr/local/var/named/slave/mdcc.cx"; masters { 212.204.230.141; }; }; joostvb@schilow.mdcc.cx:~% cat /usr/local/var/named/slave/mdcc.cx mdcc.cx. 2560 IN SOA a.ns.ad1810.com. hostmaste= r.mdcc.cx. 1062013648 16384 2048 1048576 2560 mdcc.cx. 259200 IN NS a.ns.ad1810.com. mdcc.cx. 259200 IN NS b.ns.ad1810.com. mdcc.cx. 259200 IN NS c.ns.ad1810.com. mdcc.cx. 86400 IN A 212.204.230.141 schilow.mdcc.cx. 86400 IN A 80.126.189.155 yosida.mdcc.cx. 86400 IN A 62.163.25.11 mdcc.cx. 86400 IN MX 4 a.mx.ad1810.com. Inspecting the core (I've build pdns-2.9.11.tar.gz, with a tiny patch to pdns/common_startup.cc (see yesterday's post by me), with gmake CXXFLAGS=3D'-pthread -Wall -O0 -g -fno-default-inline' ) yields: joostvb@schilow.mdcc.cx:~% gdb /usr/local/sbin/pdns_server ~/tmp/pdns_serve= r.core GNU gdb 4.16.1 Copyright 1996 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-openbsd3.3"... Core was generated by `pdns_server'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/libexec/ld.so...done. Reading symbols from /usr/lib/libstdc++.so.31.0...done. Reading symbols from /usr/lib/libm.so.1.0...done. Reading symbols from /usr/lib/libpthread.so.1.0...done. Reading symbols from /usr/lib/libc.so.29.0...done. #0 0x13b162 in ZoneParser::eatLine (this=3D0xcfbfc314, line=3D@0xcfbfb6a4,= rec=3D@0xcfbfb634) at backends/bind/zoneparser2.cc:236 236 return parseLine(parts,rec); (gdb) bt #0 0x13b162 in ZoneParser::eatLine (this=3D0xcfbfc314, line=3D@0xcfbfb6a4,= rec=3D@0xcfbfb634) at backends/bind/zoneparser2.cc:236 #1 0x1390a1 in ZoneParser::parse (this=3D0xcfbfc314, fname=3D@0x283bc4, or= igin=3D@0x283bc0, domain_id=3D1) at backends/bind/zoneparser2.cc:96 #2 0x16b2e8 in BindBackend::loadConfig (this=3D0x26e420, status=3D0x0) at = backends/bind/bindbackend.cc:551 #3 0x16a03f in BindBackend::BindBackend (this=3D0x26e420, suffix=3D@0x272d= f4) at backends/bind/bindbackend.cc:474 #4 0x1803f8 in BindFactory::make (this=3D0x271040, suffix=3D@0x272df4) at = backends/bind/bindbackend.cc:833 #5 0x79a0a in BackendMakerClass::all (this=3D0x26d900) at dnsbackend.cc:178 #6 0xb421a in UeberBackend::UeberBackend (this=3D0x27f408, pname=3D@0x26cc= c0) at ueberbackend.cc:210 #7 0x33f22 in PacketHandler::PacketHandler (this=3D0x27f400) at packethand= ler.cc:45 #8 0x492dd in TCPNameserver::go (this=3D0x274440) at tcpreceiver.cc:72 #9 0x1116dc in mainthread () at common_startup.cc:267 #10 0xa8dfc in main (argc=3D2, argv=3D0xcfbfd6e4) at receiver.cc:555 (gdb) quit Anybody has a clue on how to get this fixed? Would it be of any use if I build with a more recent gcc? Or is something else wrong here? Should I give more information? FYI: When running with zone "mdcc.cx" { type master; file "/usr/local/etc/bind/mdcc.cx"; }; in named.conf and no slave setting in pdns.conf, things work reasonably smooth. Any help would be greatly appreciated. Bye, Joost --=20 . . http://mdcc.cx/ Joost van Baal . . . . http://banach.uvt.nl/ . . http://logreport.org/ --2F7AbV2suvT8PGoH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/TfVDBgac8paUV/ARAqfUAKCCcQHtzXSuI8gWeijRaGP1/GbJ3wCfZXDp mg7B0Y9iJD5lmr247rcFIYM= =zw9N -----END PGP SIGNATURE----- --2F7AbV2suvT8PGoH-- From joostvb@mdcc.cx Fri Aug 29 07:15:22 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from topaz.ad1810.com (topaz.ad1810.com [212.204.230.141]) by spoon.powerdns.com (Postfix) with ESMTP id 069A8182E5 for ; Fri, 29 Aug 2003 07:15:22 +0200 (CEST) Received: from a25011.upc-a.chello.nl ([62.163.25.11] helo=yosida.mdcc.cx ident=qmailr) by topaz.ad1810.com with asmtp (Cipher TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1 (Debian)) id 19sbbR-00077w-00 for ; Fri, 29 Aug 2003 07:15:17 +0200 Received: (qmail 1947 invoked from network); 29 Aug 2003 05:15:14 -0000 Received: from nagy.mdcc.cx (qmailr@192.168.26.30) by yosida.mdcc.cx with SMTP; 29 Aug 2003 05:15:14 -0000 Received: (qmail 27837 invoked by uid 1000); 29 Aug 2003 05:15:09 -0000 Date: Fri, 29 Aug 2003 07:15:09 +0200 From: Joost van Baal To: PowerDNS devel List Message-ID: <20030829051509.GW15574@nagy.mdcc.cx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fq7EdiloNwzjWdQG" Content-Disposition: inline X-PGP-Fingerprint: 8FC6 A40E 31B8 7E0E 2270 D7A9 0606 9CF2 9694 57F0 X-PGP-Key-ID: 0x969457F0 X-PGP-Key: http://mdcc.cx/~joostvb/joostvb_key.asc X-Accept-Language: nl, en User-Agent: Mutt/1.5.4i Subject: [Pdns-dev] upgraded part of openbsd patch to pdns-2.9.11 X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 05:15:22 -0000 --Fq7EdiloNwzjWdQG Content-Type: multipart/mixed; boundary="Cou6PmgoyP0+llr2" Content-Disposition: inline --Cou6PmgoyP0+llr2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Since some minutes I'm using PowerDNS 2.9.11 on OpenBSD 3.3. I am using the BIND backend. I've had to make a trivial change to your patch on http://www.codeninja.nl/openbsd/powerdns to get it working with 2.9.11. Attached is a new patch-pdns_common_startup_cc. patch-pdns_receiver_cc is now included in 2.9.11 release. I didn't look at the pipe, gpgsql and gmysql patches. To all PowerDNS maintainers: thanks for this great software! Bye, Joost --=20 . . http://mdcc.cx/ Joost van Baal . . . . http://banach.uvt.nl/ . . http://logreport.org/ --Cou6PmgoyP0+llr2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdns-2.9.11-patch-pdns_common_startup_cc" Content-Transfer-Encoding: quoted-printable --- pdns/common_startup.cc.orig Fri Aug 22 14:51:55 2003 +++ pdns/common_startup.cc Wed Aug 27 13:14:28 2003 @@ -267,7 +267,8 @@ TN->go(); // tcp nameserver launch =20 // fork(); (this worked :-)) - DNSDistributor *D=3D new DNSDistributor(arg().asNum("distributor-threads= ")); // the big dispatcher! + int foo1 =3D arg().asNum("distributor-threads"); + DNSDistributor *D=3D new DNSDistributor(foo1); // the big dispatcher! pthread_create(&qtid,0,qthread,static_cast(D)); // receives pack= ets =20 void *p; --Cou6PmgoyP0+llr2-- --Fq7EdiloNwzjWdQG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/TuFdBgac8paUV/ARAgirAKCg8m7e7lFrOvTvunACaGQAn/ks6wCeOlNO Ks6Dy+OtGIkuM6d7LauvzcM= =/yTj -----END PGP SIGNATURE----- --Fq7EdiloNwzjWdQG-- From norbert@linuxnetworks.de Fri Aug 29 15:33:33 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 4E14E1803B for ; Fri, 29 Aug 2003 15:33:33 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7TDXWKr003055 for ; Fri, 29 Aug 2003 15:33:32 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS Developer Date: Fri, 29 Aug 2003 15:31:02 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308291531.03581.norbert@linuxnetworks.de> Subject: [Pdns-dev] default-ttl option X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 13:33:33 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all Are there any objections against changing ldap-default-ttl to=20 default-ttl to be useful for all backends? This would be necessary if=20 the backend doesn't (always) provide a TTL. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9PVZYACgkQxMLs5v5/7eD7cQCfS/ZCzBk+e+DUeNKt7gAyZmtj gx8AoKApD8nk2waugGbPqLQsVnxC1KCi =3DpMxR =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Sat Aug 30 13:10:41 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 94085180E6 for ; Sat, 30 Aug 2003 13:10:41 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 79F8C4430; Sat, 30 Aug 2003 13:10:41 +0200 (CEST) Date: Sat, 30 Aug 2003 13:10:41 +0200 From: bert hubert To: Joost van Baal Subject: Re: [Pdns-dev] bind backend as slave segfaults on OpenBSD 3.3 Message-ID: <20030830111041.GA16797@outpost.ds9a.nl> References: <20030828122747.GU22994@nagy.mdcc.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030828122747.GU22994@nagy.mdcc.cx> User-Agent: Mutt/1.3.28i cc: PowerDNS devel List X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 11:10:41 -0000 On Thu, Aug 28, 2003 at 02:27:47PM +0200, Joost van Baal wrote: > Hi, > > Using the bind backend as a slave on OpenBSD 3.3, with gcc 2.95.3, causes > pdns_server to segfault in ZoneParser::eatLine at > backends/bind/zoneparser2.cc:236 . Any clue on how to get this fixed > would be greatly appreciated. As long as compiling on OpenBSD requires ridiculous patches which prevent the running of 'new' within parameters, I'm willing to bet that these problems are OpenBSD related. > Reading symbols from /usr/lib/libpthread.so.1.0...done. > Reading symbols from /usr/lib/libc.so.29.0...done. > #0 0x13b162 in ZoneParser::eatLine (this=0xcfbfc314, line=@0xcfbfb6a4, rec=@0xcfbfb634) at backends/bind/zoneparser2.cc:236 > 236 return parseLine(parts,rec); This again has to do with parameter passing over the stack, which is also the cause of the earlier problems. Sorry I can't be of more help :-( -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Aug 30 13:24:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 63D5D182A8 for ; Sat, 30 Aug 2003 13:24:35 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3CD0C4017; Sat, 30 Aug 2003 13:24:35 +0200 (CEST) Date: Sat, 30 Aug 2003 13:24:35 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030830112435.GB16797@outpost.ds9a.nl> References: <200308271228.57478.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308271228.57478.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] netmasks X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 11:24:35 -0000 On Wed, Aug 27, 2003 at 12:28:38PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > There is a bug in the code to match netmasks which causes a netmask of > 0.0.0.0/0 to fail (for allow-axfr-ips and allow-recursion). Your patches causes "" to fail, it used to mean what you mean by 0.0.0.0/0. I want to keep that behavour. Can you create your patches with -uBbw ? I get whitespace changes too now which clutter the patch. Thanks! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Aug 30 13:25:07 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id CE40E18312; Sat, 30 Aug 2003 13:25:07 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id C7A8E4017; Sat, 30 Aug 2003 13:25:07 +0200 (CEST) Date: Sat, 30 Aug 2003 13:25:07 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030830112507.GC16797@outpost.ds9a.nl> References: <200308271401.43977.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308271401.43977.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer cc: PDNS User Subject: [Pdns-dev] Re: [Pdns-users] loglevel option X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 11:25:08 -0000 On Wed, Aug 27, 2003 at 02:01:42PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all > > I've seen that the loglevel option specifies how much is logged to the > console (is this true?) instead of limiting the amount of information > logged to the syslog. Is there a possibility to sort out INFO and > WARNING messages from being written to the syslog? You can do that in syslog.conf, there is no option yet. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Aug 30 13:31:45 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 533F8180E6 for ; Sat, 30 Aug 2003 13:31:45 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 3DC384082; Sat, 30 Aug 2003 13:31:45 +0200 (CEST) Date: Sat, 30 Aug 2003 13:31:45 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030830113145.GE16797@outpost.ds9a.nl> References: <200307231340.05770.norbert@linuxnetworks.de> <20030822133410.GA12886@outpost.ds9a.nl> <200308231436.30639.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308231436.30639.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: ldap backend AXFR code X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 11:31:45 -0000 On Sat, Aug 23, 2003 at 02:36:25PM +0200, Norbert Sendetzky wrote: > The patch attached below against 2.9.11 fixes this behaviour and > provides the behaviour expected by other name servers. Additionally, > there are some code improvements in the diffs included Applied. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Aug 30 14:35:21 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 2AD2C180EA for ; Sat, 30 Aug 2003 14:35:21 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 1C3C94437; Sat, 30 Aug 2003 14:35:21 +0200 (CEST) Date: Sat, 30 Aug 2003 14:35:21 +0200 From: bert hubert To: Christof Meerwald Subject: Re: [Pdns-dev] bindbackend: parsing of SRV records Message-ID: <20030830123521.GA22045@outpost.ds9a.nl> References: <20030807205314.GA10113@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030807205314.GA10113@hacking.cmeerw.net> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 12:35:21 -0000 On Thu, Aug 07, 2003 at 10:53:14PM +0200, Christof Meerwald wrote: > Hi, > > there is a bug in the parsing of SRV records in the bindbackend. See RFC > 2782 for the format of SRV records: > > "Here is the format of the SRV RR, whose DNS type code is 33: > > _Service._Proto.Name TTL Class SRV Priority Weight Port Target" > > But pdns's current parser leaves out the priority field and assumes a SRV > record looks something like: > > _Service._Proto.Name TTL Class SRV Weight Port Target Thanks, applied this. How confortable are you that this did not change other semantics, especially wrt MX records? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Aug 30 16:20:38 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 2383317FC5 for ; Sat, 30 Aug 2003 16:20:38 +0200 (CEST) Received: from notebook.linuxnetworks.de (Aff15.pppool.de [213.6.255.21]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UEKU6f006784; Sat, 30 Aug 2003 16:20:31 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 30 Aug 2003 14:06:42 +0200 User-Agent: KMail/1.5.3 References: <200308271228.57478.norbert@linuxnetworks.de> <20030830112435.GB16797@outpost.ds9a.nl> In-Reply-To: <20030830112435.GB16797@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_TNJU/kZd6b4rZMe" Message-Id: <200308301406.53461.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] netmasks X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 14:20:38 -0000 --Boundary-00=_TNJU/kZd6b4rZMe Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 30 August 2003 13:24, bert hubert wrote: > Your patches causes "" to fail, it used to mean what you mean by > 0.0.0.0/0. I want to keep that behavour. Yes, it denies all requests if it was explicitly set to "". Changed back to old behavior. > Can you create your patches with -uBbw ? I get whitespace changes > too now which clutter the patch. Attached. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9Qk1cACgkQxMLs5v5/7eAb7gCfRCaF2bnQb2+EBA5Y8tNbC8BP 6TwAnRCcDMk88DbQb9NlPKFsIgOH5+d+ =zbKj -----END PGP SIGNATURE----- --Boundary-00=_TNJU/kZd6b4rZMe Content-Type: text/x-diff; charset="iso-8859-1"; name="netmasks2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="netmasks2.diff" Only in pdns-2.9.11/pdns/: .deps Only in pdns-2.9.11/pdns/: .libs Only in pdns-2.9.11/pdns/: Makefile Only in pdns-2.9.11/pdns/: arguments.o Only in pdns-2.9.11/pdns/backends: Makefile Only in pdns-2.9.11/pdns/backends/bind: .deps Only in pdns-2.9.11/pdns/backends/bind: .libs Only in pdns-2.9.11/pdns/backends/bind: Makefile Only in pdns-2.9.11/pdns/backends/bind: arguments.o Only in pdns-2.9.11/pdns/backends/bind: bindbackend.lo Only in pdns-2.9.11/pdns/backends/bind: bindbackend.o Only in pdns-2.9.11/pdns/backends/bind: bindbackend2.lo Only in pdns-2.9.11/pdns/backends/bind: bindbackend2.o Only in pdns-2.9.11/pdns/backends/bind: bindlexer.lo Only in pdns-2.9.11/pdns/backends/bind: bindlexer.o Only in pdns-2.9.11/pdns/backends/bind: bindparser.lo Only in pdns-2.9.11/pdns/backends/bind: bindparser.o Only in pdns-2.9.11/pdns/backends/bind: dnspacket.o Only in pdns-2.9.11/pdns/backends/bind: huffman.lo Only in pdns-2.9.11/pdns/backends/bind: huffman.o Only in pdns-2.9.11/pdns/backends/bind: libbind2backend.la Only in pdns-2.9.11/pdns/backends/bind: libbindbackend.la Only in pdns-2.9.11/pdns/backends/bind: logger.o Only in pdns-2.9.11/pdns/backends/bind: misc.lo Only in pdns-2.9.11/pdns/backends/bind: misc.o Only in pdns-2.9.11/pdns/backends/bind: qtype.o Only in pdns-2.9.11/pdns/backends/bind: sillyrecords.o Only in pdns-2.9.11/pdns/backends/bind: statbag.o Only in pdns-2.9.11/pdns/backends/bind: unix_utility.lo Only in pdns-2.9.11/pdns/backends/bind: unix_utility.o Only in pdns-2.9.11/pdns/backends/bind: zone2ldap Only in pdns-2.9.11/pdns/backends/bind: zone2ldap.cc.new Only in pdns-2.9.11/pdns/backends/bind: zone2ldap.o Only in pdns-2.9.11/pdns/backends/bind: zone2sql Only in pdns-2.9.11/pdns/backends/bind: zone2sql.o Only in pdns-2.9.11/pdns/backends/bind: zoneparser2.lo Only in pdns-2.9.11/pdns/backends/bind: zoneparser2.o Only in pdns-2.9.11/pdns/: bindbackend.o Only in pdns-2.9.11/pdns/: bindbackend2.o Only in pdns-2.9.11/pdns/: bindlexer.o Only in pdns-2.9.11/pdns/: bindparser.o diff -ubBwr pdns-2.9.11.orig/pdns/common_startup.cc pdns-2.9.11/pdns/common_startup.cc --- pdns-2.9.11.orig/pdns/common_startup.cc Fri Aug 22 14:51:55 2003 +++ pdns-2.9.11/pdns/common_startup.cc Fri Aug 29 15:44:08 2003 @@ -65,7 +65,7 @@ arg().set("queue-limit","Maximum number of milliseconds to queue a query")="1500"; arg().set("recursor","If recursion is desired, IP address of a recursing nameserver")="no"; arg().set("lazy-recursion","Only recurse if question cannot be answered locally")="yes"; - arg().set("allow-recursion","List of netmasks that are allowed to recurse")=""; + arg().set("allow-recursion","List of subnets that are allowed to recurse")="0.0.0.0/0"; arg().set("disable-tcp","Do not listen to TCP queries")="no"; arg().set("disable-axfr","Do not allow zone transfers")="no"; @@ -75,7 +75,7 @@ arg().set("load-modules","Load this module - supply absolute or relative path")=""; arg().set("launch","Which backends to launch and order to query them in")=""; arg().setSwitch("disable-axfr","Disable zonetransfers but do allow TCP queries")="no"; - arg().set("allow-axfr-ips","Allow zonetransfers only from these IP addresses")=""; + arg().set("allow-axfr-ips","Allow zonetransfers only to these subnets")="0.0.0.0/0"; arg().set("slave-cycle-interval","Reschedule failed SOA serial checks once every .. seconds")="60"; arg().setSwitch("slave","Act as a slave")="no"; @@ -257,7 +257,7 @@ pthread_t qtid; StatWebServer sws; - if(arg()["webserver"]!="no") + if(arg().mustDo("webserver")) sws.go(); if(arg().mustDo("slave") || arg().mustDo("master")) Only in pdns-2.9.11/pdns/: common_startup.o Only in pdns-2.9.11/pdns/: communicator.o Only in pdns-2.9.11/pdns/: dnsbackend.o Only in pdns-2.9.11/pdns/: dnspacket.o diff -ubBwr pdns-2.9.11.orig/pdns/dnsproxy.cc pdns-2.9.11/pdns/dnsproxy.cc --- pdns-2.9.11.orig/pdns/dnsproxy.cc Mon Jan 27 13:55:48 2003 +++ pdns-2.9.11/pdns/dnsproxy.cc Wed Aug 27 10:59:20 2003 @@ -94,7 +94,7 @@ bool DNSProxy::recurseFor(DNSPacket* p) { - return d_ng.empty() || d_ng.match((struct sockaddr_in *)&p->remote); + return d_ng.match((struct sockaddr_in *)&p->remote); } /** returns false if p->remote is not allowed to recurse via us */ Only in pdns-2.9.11/pdns/: dnsproxy.o Only in pdns-2.9.11/pdns/: dynhandler.o Only in pdns-2.9.11/pdns/: dynlistener.o Only in pdns-2.9.11/pdns/: dynloader.o Only in pdns-2.9.11/pdns/: dynmessenger.o Only in pdns-2.9.11/pdns/: gsqlbackend.o Only in pdns-2.9.11/pdns/: huffman.o diff -ubBwr pdns-2.9.11.orig/pdns/iputils.hh pdns-2.9.11/pdns/iputils.hh --- pdns-2.9.11.orig/pdns/iputils.hh Wed Nov 27 16:18:33 2002 +++ pdns-2.9.11/pdns/iputils.hh Wed Aug 27 11:16:48 2003 @@ -55,7 +55,7 @@ if((p=strchr(mask.c_str(),'/'))) bits=atoi(p+1); - d_mask=~((1<<(32-bits))-1); // 1<<16 0000 0000 0000 0000 0000 0000 0000 0000 + d_mask=~(0xFFFFFFFF>>bits); struct in_addr a; if(!Utility::inet_aton(mask.substr(0,p-mask.c_str()).c_str(), &a)) Only in pdns-2.9.11/pdns/: logger.o Only in pdns-2.9.11/pdns/: lwres.o diff -ubBwr pdns-2.9.11.orig/pdns/misc.cc pdns-2.9.11/pdns/misc.cc --- pdns-2.9.11.orig/pdns/misc.cc Sun Mar 30 23:49:23 2003 +++ pdns-2.9.11/pdns/misc.cc Wed Aug 27 12:05:43 2003 @@ -145,41 +145,6 @@ st.port=atoi(parts[1].c_str()); } -int matchNetmask(const char *address, const char *omask) -{ - struct in_addr a,m; - int bits=32; - char *sep; - - char *mask=strdup(omask); - sep=strchr(mask,'/'); - - if(sep) { - bits=atoi(sep+1); - *sep=0; - } - - if(!Utility::inet_aton(address, &a) || !Utility::inet_aton(mask, &m)) - { - free(mask); - return -1; - } - - free(mask); - - // bits==32 -> 0xffffffff - // bits==16 -> 0xffff0000 - // bits==0 -> 0x00000000 - unsigned int bmask=~((1<<(32-bits))-1); // 1<<16 0000 0000 0000 0000 0000 0000 0000 0000 - - /* - fprintf(stderr,"%x\n",bmask); - fprintf(stderr,"%x\n",(htonl((unsigned int)a.s_addr) & bmask)); - fprintf(stderr,"%x\n",(htonl((unsigned int)m.s_addr) & bmask)); - */ - - return ((htonl((unsigned int)a.s_addr) & bmask) == (htonl((unsigned int)m.s_addr) & bmask)); -} int waitForData(int fd, int seconds) { diff -ubBwr pdns-2.9.11.orig/pdns/misc.hh pdns-2.9.11/pdns/misc.hh --- pdns-2.9.11.orig/pdns/misc.hh Fri Feb 7 13:17:01 2003 +++ pdns-2.9.11/pdns/misc.hh Wed Aug 27 12:27:17 2003 @@ -45,7 +45,6 @@ bool endsOn(const string &domain, const string &suffix); string nowTime(); const string unquotify(const string &item); -int matchNetmask(const char *address, const char *omask); string humanDuration(time_t passed); void chomp(string &line, const string &delim); bool stripDomainSuffix(string *qname, const string &domain); Only in pdns-2.9.11/pdns/: misc.o Only in pdns-2.9.11/pdns/: nameserver.o Only in pdns-2.9.11/pdns/: packetcache.o Only in pdns-2.9.11/pdns/: packethandler.o Only in pdns-2.9.11/pdns/: pdns Only in pdns-2.9.11/pdns/: pdns_control Only in pdns-2.9.11/pdns/: pdns_recursor Only in pdns-2.9.11/pdns/: pdns_recursor.o Only in pdns-2.9.11/pdns/: pdns_server Only in pdns-2.9.11/pdns/: qtype.o Only in pdns-2.9.11/pdns/: randombackend.o Only in pdns-2.9.11/pdns/: receiver.o Only in pdns-2.9.11/pdns/: resolver.o Only in pdns-2.9.11/pdns/: session.o Only in pdns-2.9.11/pdns/: sillyrecords.o Only in pdns-2.9.11/pdns/: statbag.o Only in pdns-2.9.11/pdns/: syncres.o diff -ubBwr pdns-2.9.11.orig/pdns/tcpreceiver.cc pdns-2.9.11/pdns/tcpreceiver.cc --- pdns-2.9.11.orig/pdns/tcpreceiver.cc Fri Aug 22 15:08:02 2003 +++ pdns-2.9.11/pdns/tcpreceiver.cc Sat Aug 30 14:01:41 2003 @@ -53,6 +53,7 @@ Semaphore *TCPNameserver::d_connectionroom_sem; PacketHandler *TCPNameserver::s_P; int TCPNameserver::s_timeout; +NetmaskGroup TCPNameserver::d_ng; int TCPNameserver::sendDelPacket(DNSPacket *p, int outsock) @@ -244,22 +245,14 @@ return 0; } -static bool canDoAXFR(DNSPacket *q) +bool TCPNameserver::canDoAXFR(DNSPacket *q) { if(arg().mustDo("disable-axfr")) return false; - if(arg()["allow-axfr-ips"].empty()) + if( arg()["allow-axfr-ips"].empty() || d_ng.match( (struct sockaddr_in *) &q->remote ) ) return true; - - vectorparts; - stringtok(parts,arg()["allow-axfr-ips"],", "); // is this IP on the guestlist? - for(vector::const_iterator i=parts.begin();i!=parts.end();++i) { - if(matchNetmask(q->getRemote().c_str(),i->c_str())==1) - return true; - } - extern CommunicatorClass Communicator; if(Communicator.justNotified(q->qdomain, q->getRemote())) { // we just notified this ip @@ -407,6 +400,12 @@ throw AhuException("No local address specified"); d_highfd=0; + + vector parts; + stringtok( parts, arg()["allow-axfr-ips"], ", \t" ); // is this IP on the guestlist? + for( vector::const_iterator i = parts.begin(); i != parts.end(); ++i ) { + d_ng.addMask( *i ); + } #ifndef WIN32 signal(SIGPIPE,SIG_IGN); diff -ubBwr pdns-2.9.11.orig/pdns/tcpreceiver.hh pdns-2.9.11/pdns/tcpreceiver.hh --- pdns-2.9.11.orig/pdns/tcpreceiver.hh Wed Nov 27 16:18:31 2002 +++ pdns-2.9.11/pdns/tcpreceiver.hh Wed Aug 27 11:44:34 2003 @@ -20,6 +20,7 @@ #define PDNS_TCPRECEIVER_HH #include "dns.hh" +#include "iputils.hh" #include "dnsbackend.hh" #include "packethandler.hh" #include @@ -50,6 +51,7 @@ static int readLength(int fd, struct sockaddr_in *remote); static void getQuestion(int fd, char *mesg, int pktlen, const struct sockaddr_in &remote); static int doAXFR(const string &target, DNSPacket *q, int outsock); + static bool canDoAXFR(DNSPacket *q); static void *doConnection(void *data); static void *launcher(void *data); void thread(void); @@ -57,6 +59,7 @@ static PacketHandler *s_P; pthread_t d_tid; static Semaphore *d_connectionroom_sem; + static NetmaskGroup d_ng; vectord_sockets; int d_highfd; Only in pdns-2.9.11/pdns/: tcpreceiver.o Only in pdns-2.9.11/pdns/: ueberbackend.o Only in pdns-2.9.11/pdns/: unix_utility.o Only in pdns-2.9.11/pdns/: webserver.o Only in pdns-2.9.11/pdns/: ws.o Only in pdns-2.9.11/pdns/: zoneparser2.o --Boundary-00=_TNJU/kZd6b4rZMe-- From ahu@outpost.ds9a.nl Sat Aug 30 16:28:18 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 04D9718042 for ; Sat, 30 Aug 2003 16:28:18 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id E55414082; Sat, 30 Aug 2003 16:28:17 +0200 (CEST) Date: Sat, 30 Aug 2003 16:28:17 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030830142817.GA28881@outpost.ds9a.nl> References: <200308271228.57478.norbert@linuxnetworks.de> <20030830112435.GB16797@outpost.ds9a.nl> <200308301406.53461.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308301406.53461.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] netmasks X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 14:28:18 -0000 On Sat, Aug 30, 2003 at 02:06:42PM +0200, Norbert Sendetzky wrote: > > > Can you create your patches with -uBbw ? I get whitespace changes > > too now which clutter the patch. > > Attached. Applied. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Aug 30 17:50:34 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id CB72B18158 for ; Sat, 30 Aug 2003 17:50:34 +0200 (CEST) Received: from notebook.linuxnetworks.de (Affef.pppool.de [213.6.255.239]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UFoWkY026385; Sat, 30 Aug 2003 17:50:32 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 30 Aug 2003 17:23:28 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308301723.29965.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Exception if parameter is not defined X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 15:50:35 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Isn't it a little bit hard to throw a fatal error if a parameter=20 should be set in ArgMap and nobody claims responsible for? IMHO it would be better to report an error to syslog, so PDNS could=20 proceed starting up. I've seen the "lax" parameter, but it is set to false by default and=20 most programs use the default value. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9QwXAACgkQxMLs5v5/7eCoYgCeKZiBtuEmNF8NENJTbeNkWOOr ctkAn2LOYN6QhLAhDVB77r9REBfMlrRN =3DIQhv =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sat Aug 30 17:50:37 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 3B2141830F for ; Sat, 30 Aug 2003 17:50:37 +0200 (CEST) Received: from notebook.linuxnetworks.de (Affef.pppool.de [213.6.255.239]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UFoWka026385; Sat, 30 Aug 2003 17:50:34 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 30 Aug 2003 17:46:31 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_XbMU/lP7m96Nwdq" Message-Id: <200308301746.33301.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] default-ttl + ldapbackend improvements X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 15:50:37 -0000 --Boundary-00=_XbMU/lP7m96Nwdq Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert =46irst please add the line below to common_startup.cc. Otherwise the=20 attached patch won't compile. + arg().set("default-ttl","Seconds a result is valid if not set=20 otherwise")=3D"3600"; The diff contains the following improvments =2D - use default-ttl instead of ldap-default-ttl (which is depricated) =2D - allow a comma seperated list of host:port combinations for fail-over= =20 (ldap-port is depricated) =2D - Information about searches and results is now only available in=20 debug mode (for speedup and minimized syslog output) =2D - Upper case IN-ADDR.ARPA requests are handled correctly =2D - Various code improvements Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9QxtcACgkQxMLs5v5/7eA27QCeMKTSuIX8duPnU8XsKZgcRti7 yAYAoLNMY1z3yfWT/SgijPQE6X67nKdc =3DI4kQ =2D----END PGP SIGNATURE----- --Boundary-00=_XbMU/lP7m96Nwdq Content-Type: text/x-diff; charset="iso-8859-15"; name="ldapbackend.cc.2.9.11-2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.cc.2.9.11-2.diff" --- pdns-2.9.11.orig/modules/ldapbackend/ldapbackend.cc Sat Aug 30 14:09:40 2003 +++ pdns-2.9.11/modules/ldapbackend/ldapbackend.cc Sat Aug 30 17:25:59 2003 @@ -23,25 +23,43 @@ -static int Toupper(int c) +static int to_upper( int c ) { - return toupper(c); + return toupper( c ); +} + + +static int to_lower( int c ) +{ + return tolower( c ); +} + + +static int comma2space( int c ) +{ + if( c == 0x2c ) { + return 0x20; + } + + return c; } LdapBackend::LdapBackend( const string &suffix ) { - m_msgid = 0; - m_qname = ""; setArgPrefix( "ldap" + suffix ); + string hosts = getArg( "host" ); - - m_default_ttl = (u_int32_t) strtol( getArg( "default-ttl" ).c_str(), NULL, 10 ); + m_msgid = 0; + m_qname = ""; + m_default_ttl = arg().asNum( "default-ttl" ); try { - L << Logger::Info << backendname << " LDAP Server = " << getArg( "host" ) << ":" << getArg( "port" ) << endl; - m_pldap = new PowerLDAP( getArg( "host" ), (u_int16_t) atoi( getArg( "port" ).c_str() ) ); + transform( hosts.begin(), hosts.end(), hosts.begin(), &comma2space ); + L << Logger::Info << backendname << " LDAP servers = " << hosts << endl; + + m_pldap = new PowerLDAP( hosts.c_str(), atoi( getArg( "port" ).c_str() ) ); m_pldap->simpleBind( getArg( "binddn" ), getArg( "secret" ) ); } catch( LDAPException &e ) @@ -70,8 +88,6 @@ try { - L << Logger::Notice << backendname << " AXFR request for " << target << endl; - // search for DN of SOA record which is SOA for target zone filter = "(&(associatedDomain=" + target + ")(SOARecord=*))"; @@ -83,7 +99,7 @@ return false; } - if( m_result.empty() || m_result.find( "dn" ) == m_result.end() || m_result["dn"].empty() ) + if( m_result.empty() || !m_result.count( "dn" ) || m_result["dn"].empty() ) { L << Logger::Error << backendname << " No SOA record for " << target << endl; return false; @@ -136,8 +152,9 @@ if( mustDo( "disable-ptrrecord" ) ) // PTRRecords will be derived from ARecords { - len = qesc.length(); + transform( qesc.begin(), qesc.end(), qesc.begin(), &to_lower ); stringtok( parts, qesc, "." ); + len = qesc.length(); if( parts.size() == 6 && len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups { @@ -175,13 +192,14 @@ } } + DLOG( L << Logger::Debug << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + m_adomain = m_adomains.end(); // skip loops in get() first time - L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); } catch( LDAPException &le ) { - L << Logger::Warning << backendname << " Unable to search LDAP directory: " << le.what() << endl; + L << Logger::Error << backendname << " Unable to search LDAP directory: " << le.what() << endl; return; } catch( exception &e ) @@ -214,7 +232,7 @@ { attrname = m_attribute->first; qstr = attrname.substr( 0, attrname.length() - 6 ); // extract qtype string from ldap attribute name - transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper ); + transform( qstr.begin(), qstr.end(), qstr.begin(), &to_upper ); qt = QType( const_cast(qstr.c_str()) ); while( m_value != m_attribute->second.end() ) @@ -244,7 +262,7 @@ rr.content = content; m_value++; - L << Logger::Info << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl; + DLOG( L << Logger::Debug << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl ); return true; } @@ -262,7 +280,7 @@ } catch( LDAPException &le ) { - L << Logger::Warning << backendname << " Search failed: " << le.what() << endl; + L << Logger::Error << backendname << " Search failed: " << le.what() << endl; } catch( exception &e ) { @@ -301,7 +319,7 @@ m_adomains.clear(); m_ttl = m_default_ttl; - if( m_result.find( "dNSTTL" ) != m_result.end() && !m_result["dNSTTL"].empty() ) + if( m_result.count( "dNSTTL" ) && !m_result["dNSTTL"].empty() ) { m_ttl = (u_int32_t) strtol( m_result["dNSTTL"][0].c_str(), NULL, 10 ); m_result.erase( "dNSTTL" ); @@ -310,7 +328,7 @@ if( !m_qname.empty() ) // request was a normal lookup() { m_adomains.push_back( m_qname ); - if( m_result.find( "associatedDomain" ) != m_result.end() ) + if( m_result.count( "associatedDomain" ) ) { m_result["PTRRecord"] = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); @@ -318,7 +336,7 @@ } else // request was a list() for AXFR { - if( m_result.find( "associatedDomain" ) != m_result.end() ) + if( m_result.count( "associatedDomain" ) ) { m_adomains = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); @@ -342,13 +360,13 @@ void declareArguments( const string &suffix="" ) { - declare( suffix, "host", "your ldap server","localhost" ); - declare( suffix, "port", "ldap server port","389" ); + declare( suffix, "host", "one or more ldap server","localhost:389" ); + declare( suffix, "port", "ldap server port (depricated, use ldap-host)","389" ); declare( suffix, "basedn", "search root in ldap tree (must be set)","" ); declare( suffix, "binddn", "user dn for non anonymous binds","" ); declare( suffix, "secret", "user password for non anonymous binds", "" ); declare( suffix, "disable-ptrrecord", "disable necessity for seperate PTR records", "no" ); - declare( suffix, "default-ttl", "default ttl if DNSTTL is not set", "86400" ); + declare( suffix, "default-ttl", "default ttl if DNSTTL is not set (depricated, use default-ttl)", "3600" ); } @@ -369,7 +387,7 @@ Loader() { BackendMakers().report( new LdapFactory ); - L << Logger::Notice << backendname << " This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl; + L << Logger::Info << backendname << " This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl; } }; --Boundary-00=_XbMU/lP7m96Nwdq-- From norbert@linuxnetworks.de Sat Aug 30 17:55:36 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id CF91E17F86 for ; Sat, 30 Aug 2003 17:55:36 +0200 (CEST) Received: from notebook.linuxnetworks.de (Affef.pppool.de [213.6.255.239]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UFtZkY006600 for ; Sat, 30 Aug 2003 17:55:35 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS Developer Date: Sat, 30 Aug 2003 17:52:38 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308301752.40124.norbert@linuxnetworks.de> Subject: [Pdns-dev] Warning while building pdns package for Debian woody X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 15:55:37 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all Does anyone know how to fix this? dpkg-gencontrol: warning: unknown substitution variable=20 ${shlibs:Depends} Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9QyEYACgkQxMLs5v5/7eBfXwCfSt0/2U5SAX5fNBmRDOnG+vMU VtMAoJLzi5FuMhMtwuKNi2ObIQrF7Vyv =3DSQ37 =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Sat Aug 30 17:57:15 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 2FC77180EE for ; Sat, 30 Aug 2003 17:57:15 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 116234439; Sat, 30 Aug 2003 17:57:15 +0200 (CEST) Date: Sat, 30 Aug 2003 17:57:15 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] Warning while building pdns package for Debian woody Message-ID: <20030830155715.GA31055@outpost.ds9a.nl> References: <200308301752.40124.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308301752.40124.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 15:57:15 -0000 On Sat, Aug 30, 2003 at 05:52:38PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all > > Does anyone know how to fix this? > > dpkg-gencontrol: warning: unknown substitution variable > ${shlibs:Depends} You get this when building the static version, you can remove the line that mention the depends if it irks you. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Aug 30 17:58:09 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 72523180EE for ; Sat, 30 Aug 2003 17:58:09 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 6A9E64439; Sat, 30 Aug 2003 17:58:09 +0200 (CEST) Date: Sat, 30 Aug 2003 17:58:09 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030830155809.GB31055@outpost.ds9a.nl> References: <200308301723.29965.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308301723.29965.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: Exception if parameter is not defined X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 15:58:09 -0000 On Sat, Aug 30, 2003 at 05:23:28PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > Isn't it a little bit hard to throw a fatal error if a parameter > should be set in ArgMap and nobody claims responsible for? > IMHO it would be better to report an error to syslog, so PDNS could > proceed starting up. Nope - it is an error you should notice, it should hurt. Think of the linux BUG_ON parameter, the same discussion applies. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Aug 30 18:15:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 91A2418284 for ; Sat, 30 Aug 2003 18:15:53 +0200 (CEST) Received: from notebook.linuxnetworks.de (Affef.pppool.de [213.6.255.239]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UGFpkQ028537; Sat, 30 Aug 2003 18:15:51 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 30 Aug 2003 18:12:24 +0200 User-Agent: KMail/1.5.3 References: <200308301723.29965.norbert@linuxnetworks.de> <20030830155809.GB31055@outpost.ds9a.nl> In-Reply-To: <20030830155809.GB31055@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308301812.25523.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: Exception if parameter is not defined X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 16:15:53 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 30 August 2003 17:58, bert hubert wrote: > > Isn't it a little bit hard to throw a fatal error if a parameter > > should be set in ArgMap and nobody claims responsible for? > > IMHO it would be better to report an error to syslog, so PDNS > > could proceed starting up. > > Nope - it is an error you should notice, it should hurt. Think of > the linux BUG_ON parameter, the same discussion applies. I don't know about this isse. My problems is that I marked two ldap config options as depricated,=20 but it may take a very long time before I can remove them from the=20 code (without turning pdns into an endless crash/respawn loop). Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9QzOgACgkQxMLs5v5/7eBm/QCffi78umJTKHCW1GEbU3Mz+Pyh 9V0An1paOXiGz9hlTXT6xi9b89ZfTmBi =3DFbtN =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Sat Aug 30 18:18:42 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id DA7F91800C for ; Sat, 30 Aug 2003 18:18:42 +0200 (CEST) Received: from notebook.linuxnetworks.de (Affef.pppool.de [213.6.255.239]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h7UGIekQ004463; Sat, 30 Aug 2003 18:18:41 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] Warning while building pdns package for Debian woody Date: Sat, 30 Aug 2003 18:15:44 +0200 User-Agent: KMail/1.5.3 References: <200308301752.40124.norbert@linuxnetworks.de> <20030830155715.GA31055@outpost.ds9a.nl> In-Reply-To: <20030830155715.GA31055@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308301815.47206.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 16:18:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 30 August 2003 17:57, bert hubert wrote: > > dpkg-gencontrol: warning: unknown substitution variable > > ${shlibs:Depends} > > You get this when building the static version, you can remove the > line that mention the depends if it irks you. Applies also to dynamic builds. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9QzbAACgkQxMLs5v5/7eB2NgCgkyLEkgduFTQP/oirqIKsIBZT AacAn29kDyV97tlWMoeqYUKgRyIt9Doz =4o2S -----END PGP SIGNATURE----- From cmeerw@web.de Sun Aug 31 12:33:03 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 9938118117 for ; Sun, 31 Aug 2003 12:33:03 +0200 (CEST) Received: from paris.utanet.at ([213.90.36.7]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19tPVx-0007pO-00; Sun, 31 Aug 2003 12:32:57 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by paris.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19tPVx-0004pr-00; Sun, 31 Aug 2003 12:32:57 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.20) id 19tPVw-00009y-8c; Sun, 31 Aug 2003 12:32:56 +0200 Date: Sun, 31 Aug 2003 12:32:56 +0200 From: Christof Meerwald To: bert hubert Message-ID: <20030831103256.GA597@hacking.cmeerw.net> References: <20030807205314.GA10113@hacking.cmeerw.net> <20030830123521.GA22045@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030830123521.GA22045@outpost.ds9a.nl> X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: bindbackend: parsing of SRV records X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 10:33:03 -0000 On Sat, 30 Aug 2003 14:35:21 +0200, bert hubert wrote: > On Thu, Aug 07, 2003 at 10:53:14PM +0200, Christof Meerwald wrote: >> there is a bug in the parsing of SRV records in the bindbackend. See RFC >> 2782 for the format of SRV records: > Thanks, applied this. How confortable are you that this did not change other > semantics, especially wrt MX records? I am pretty sure it doesn't have any negative side-effects on the parsing of MX records. From looking at the patch I don't see how it could affect the parsing of MX records. And of course, it works for me (for MX and SRV records). bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From norbert@linuxnetworks.de Mon Sep 1 15:52:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 8EED717FA7 for ; Mon, 1 Sep 2003 15:52:54 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h81DqroL018393; Mon, 1 Sep 2003 15:52:53 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 1 Sep 2003 15:49:30 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_q50U/OxiqCNhKNc" Message-Id: <200309011549.32839.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] small cleanups X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 13:52:54 -0000 --Boundary-00=_q50U/OxiqCNhKNc Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I have two patches for you, removing two FIXMEs. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9TTmoACgkQxMLs5v5/7eBfqQCfXE2m+9h7il7IR6iJcOoIx78e tm4AoItKe6W9zXASvkd8mwaaDxIQrbMW =dzm5 -----END PGP SIGNATURE----- --Boundary-00=_q50U/OxiqCNhKNc Content-Type: text/x-diff; charset="iso-8859-15"; name="arg_contains.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arg_contains.diff" --- pdns-2.9.11.orig/pdns/arguments.cc Wed Dec 18 10:01:58 2002 +++ pdns-2.9.11/pdns/arguments.cc Sun Aug 31 20:43:37 2003 @@ -81,33 +81,21 @@ } -// FIXME XXX this is pretty ugly bool ArgvMap::contains(const string &var, const string &val) { - const string content(params[var]); + vector parts; + vector::const_iterator i; - if(content==val) // easy as pie - return true; - string part; - for(string::const_iterator i=content.begin(); - i!=content.end(); - i++) - { - if((*i==' ' || *i==',' || *i=='\t' || (i+1)==content.end()) && !part.empty()) + stringtok( parts, params[var], ", \t" ); + for( i = parts.begin(); i != parts.end(); i++ ) { - if(i+1==content.end()) - part+=*i; - - if(part==val) - return true; - part=""; + if( *i == val ) { + return true; + } } - else - part+=*i; - - } - return false; + + return false; } --Boundary-00=_q50U/OxiqCNhKNc Content-Type: text/x-diff; charset="iso-8859-15"; name="ph_chopoff.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ph_chopoff.diff" --- pdns-2.9.11.orig/pdns/packethandler.cc Sat Jun 21 12:04:32 2003 +++ pdns-2.9.11/pdns/packethandler.cc Sun Aug 31 21:16:33 2003 @@ -200,44 +200,33 @@ } } if(haveIt) { - *zoneId=sd->domain_id; + *zoneId=sd->domain_id; *sd=cachedSD; } return haveIt; } + /** Determines if we are authoritative for a zone, and at what level */ bool PacketHandler::getAuth(DNSPacket *p, SOAData *sd, const string &target, int *zoneId) { - DNSResourceRecord rr; + string subdomain = target; - vectorparts; - stringtok(parts,target,"."); // www.us.powerdns.com -> 'www' 'us' 'powerdns' 'com' - - unsigned int spos=0; - string subdomain; - // easy FIXME: convert this to chopOff - while(spos<=parts.size()) { - if(spos us.powerdns.com -> powerdns.com -> com -> - subdomain=parts[spos++]; - for(unsigned int i=spos;iqname=subdomain; - *zoneId=sd->domain_id; - return true; - } - } - return false; + do + { + if( B.getSOA( subdomain, *sd ) ) + { + sd->qname = subdomain; + *zoneId = sd->domain_id; + return true; + } + } + while( chopOff( subdomain ) ); // 'www.powerdns.org' -> 'powerdns.org' -> 'org' -> '' + + return false; } + /** returns 1 in case of a straight match, 2 in case of a wildcard CNAME (groan), 0 in case of no hit */ int PacketHandler::doWildcardRecords(DNSPacket *p, DNSPacket *r, string &target) --Boundary-00=_q50U/OxiqCNhKNc-- From norbert@linuxnetworks.de Tue Sep 2 13:30:33 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id CBAEB18019 for ; Tue, 2 Sep 2003 13:30:33 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h82BUWpJ002616; Tue, 2 Sep 2003 13:30:32 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Tue, 2 Sep 2003 13:26:41 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_x5HV/3LjMPvWti7" Message-Id: <200309021326.44116.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] upperCase() -> toUpper() X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 11:30:34 -0000 --Boundary-00=_x5HV/3LjMPvWti7 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert A little patch which changes upperCase() to toUpper() (and its=20 behaviour) to make it similar to toLower(). Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9UfnEACgkQxMLs5v5/7eDdZACfXSFlRUCYE9vtDF2mWtnLM8Zk VAAAmgJOwuhpIG0Dc7ZUGMq9x9ggpEaO =3DE6UQ =2D----END PGP SIGNATURE----- --Boundary-00=_x5HV/3LjMPvWti7 Content-Type: text/x-diff; charset="iso-8859-15"; name="toUpper.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="toUpper.diff" --- pdns-2.9.11.orig/pdns/misc.hh Sun Aug 31 21:50:00 2003 +++ pdns-2.9.11/pdns/misc.hh Tue Sep 2 10:34:42 2003 @@ -76,7 +76,6 @@ return (p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]; } -void upperCase(string& s); struct ServiceTuple { @@ -159,6 +158,17 @@ for(unsigned int i = 0; i < reply.length(); i++) reply[i] = tolower(reply[i]); return reply; +} + + +// Make s uppercase: +inline string toUpper( const string& s ) +{ + string r(s); + for( unsigned int i = 0; i < s.length(); i++ ) { + r[i] = toupper( r[i] ); + } + return r; } --- pdns-2.9.11.orig/pdns/misc.cc Sun Aug 31 21:50:00 2003 +++ pdns-2.9.11/pdns/misc.cc Tue Sep 2 10:20:30 2003 @@ -201,12 +201,6 @@ return d_set.tv_sec; } -// Make s uppercase: -void upperCase(string& s) { - for(unsigned int i = 0; i < s.length(); i++) - s[i] = toupper(s[i]); -} - void chomp(string &line, const string &delim) { --- pdns-2.9.11.orig/pdns/dynlistener.cc Mon Dec 30 23:53:41 2002 +++ pdns-2.9.11/pdns/dynlistener.cc Tue Sep 2 00:23:41 2003 @@ -206,7 +206,7 @@ sendLine("Empty line"); continue; } - upperCase(parts[0]); + parts[0] = toUpper( parts[0] ); if(!d_funcdb[parts[0]]) { if(d_restfunc) sendLine((*d_restfunc)(parts,d_ppid)); --Boundary-00=_x5HV/3LjMPvWti7-- From norbert@linuxnetworks.de Tue Sep 2 23:17:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id E8572183BC for ; Tue, 2 Sep 2003 23:17:53 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.165.106.NEFkom.net [212.114.165.106]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h82LHqpJ027293; Tue, 2 Sep 2003 23:17:52 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Tue, 2 Sep 2003 23:13:41 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200309022313.48126.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] only-soa? X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 21:17:54 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert What is the only-soa option for? The description in common-startup.cc=20 is obviously wrong: arg().set("only-soa","Make sure that no SOA serial is less than this=20 number")=3D"org"; Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9VCAoACgkQxMLs5v5/7eDGTACeJELMS6UahPIxoHros3a1TnvJ sY0AoJ/4EjKB+HrL17LOlvVgcnkVI+S4 =3DUMre =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Wed Sep 3 00:51:29 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 4BD1F17FD0 for ; Wed, 3 Sep 2003 00:51:29 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.165.106.NEFkom.net [212.114.165.106]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h82MpRHj002041; Wed, 3 Sep 2003 00:51:27 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Wed, 3 Sep 2003 00:47:21 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200309030047.23309.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] precedence of getAuth() and recursion X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 22:51:29 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert In packethandler.cc::question() recursion is done before checking if=20 we are finally authoritive for the domain. IMHO it should be the=20 other way round: first check, then recurse. Background: Up to now, not existent hostnames are first checked against the=20 database (which fails), then a wildcard search is done (if no=20 wildcard domains are in the database, this also fails) and after=20 this, recursion is done. Checking for authority would be done=20 afterwards, but it is never done because recursion returns almost=20 ever a SOA record of a root server. As a result, requests for not=20 existent names are always directed to the root servers (if you use=20 internal domains like .dom) even if we are authoritive for the=20 domain. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9VHfkACgkQxMLs5v5/7eC6jQCfdB5i6pI/3amdWuh8jexLyj0X BjMAn2n63pPynYbEh4Yz6bECOOYVVn95 =3DGqF/ =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Mon Sep 8 12:25:58 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 4DCB618255; Mon, 8 Sep 2003 12:25:58 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h88APuGY019588; Mon, 8 Sep 2003 12:25:56 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: Chris Andrews Date: Mon, 8 Sep 2003 12:23:10 +0200 User-Agent: KMail/1.5.3 References: <7C0E0020-E09C-11D7-B29F-0003935B4554@ethosmedia.com> <200309071523.16038.norbert@linuxnetworks.de> <20030908080404.GD17362@nodnol.org> In-Reply-To: <20030908080404.GD17362@nodnol.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200309081223.34574.norbert@linuxnetworks.de> cc: PDNS Developer cc: PDNS User Subject: [Pdns-dev] Re: [Pdns-users] Questions redux X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 10:25:58 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 08 September 2003 10:04, Chris Andrews wrote: > On Sun, Sep 07, 2003 at 03:23:14PM +0200, Norbert Sendetzky wrote: > > What about big endian vs. little endian in this example? > > getLong() returns network byte order (at least I think so), but > > the replaced code misses the ntohl() function. Isn't the output > > in your example different? > > Er, you could be right. I remember there being an endianness issue > with the first patch I submitted, which I hadn't seen on SPARC. I'm > afraid I don't have the patch to hand to check. After a quick look at dnspacket.cc it seems that in getAnswers() the=20 SOA case produces a wrong output. Each getLong() must be included in=20 a ntohl(). I will post a patch soon. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9cWJIACgkQxMLs5v5/7eB9OACgidxHTjukMMzhUBom6XKfPn5c krUAoIM8+T/L/whPn2vnplOrKmegZNuo =3D7TOL =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Mon Sep 8 13:09:58 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id B51FD18174 for ; Mon, 8 Sep 2003 13:09:58 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h88B9uqE004330; Mon, 8 Sep 2003 13:09:56 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 8 Sep 2003 13:09:25 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_lNGX/txgPtH+Gy9" Message-Id: <200309081309.26911.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 11:09:59 -0000 --Boundary-00=_lNGX/txgPtH+Gy9 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Here's a small patch to fix an endian problem in the getAnswers()=20 function. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9cY2UACgkQxMLs5v5/7eBX1gCdF/lu2wMyUWNYmN5fzCnddRN6 UzIAn0ObO/ZydtqLFPy7TxkfUF3UB6aY =3DW1oJ =2D----END PGP SIGNATURE----- --Boundary-00=_lNGX/txgPtH+Gy9 Content-Type: text/x-diff; charset="iso-8859-15"; name="dnspacket_endian.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dnspacket_endian.diff" --- pdns-2.9.11.orig/pdns/dnspacket.cc Thu Mar 27 11:40:40 2003 +++ pdns-2.9.11/pdns/dnspacket.cc Mon Sep 8 12:28:07 2003 @@ -1217,11 +1217,11 @@ // explicitly copy the SOA values out of the packet to avoid // SPARC alignment issues. - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset )); - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+4 )); - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+8 )); - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+12 )); - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+16 )); + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset ) ) ); + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 4 ) ) ); + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 8 ) ) ); + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 12 ) ) ); + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 16 ) ) ); break; --Boundary-00=_lNGX/txgPtH+Gy9-- From ahu@outpost.ds9a.nl Mon Sep 8 13:56:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 2DDB11804A for ; Mon, 8 Sep 2003 13:56:53 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id D92B53FDA; Mon, 8 Sep 2003 13:56:52 +0200 (CEST) Date: Mon, 8 Sep 2003 13:56:52 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030908115652.GA11213@outpost.ds9a.nl> References: <200309081309.26911.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309081309.26911.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 11:56:53 -0000 On Mon, Sep 08, 2003 at 01:09:25PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > Here's a small patch to fix an endian problem in the getAnswers() > function. Can you explain to me how you think that this will not break pdns on little endian platforms? I don't see that. Thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Mon Sep 8 15:43:14 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 1C2F218378 for ; Mon, 8 Sep 2003 15:43:14 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h88Dh787014080; Mon, 8 Sep 2003 15:43:10 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 8 Sep 2003 15:41:52 +0200 User-Agent: KMail/1.5.3 References: <200309081309.26911.norbert@linuxnetworks.de> <20030908115652.GA11213@outpost.ds9a.nl> In-Reply-To: <20030908115652.GA11213@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200309081541.57297.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 13:43:14 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 08 September 2003 13:56, bert hubert wrote: > > Here's a small patch to fix an endian problem in the getAnswers() > > function. > > Can you explain to me how you think that this will not break pdns > on little endian platforms? ntohl() is a standard macro provided on all systems which is defined=20 differently on big endian and little endian architectures. On big=20 endian architectures it does nothing while it resorts the bytes on=20 little endian architectures. If I remember the Intel byte order correctly, ntohl() changes a.b.c.d (network byte order =3D big endian) to b.a.d.c (host byte order=20 on little endian architectures - correct me if I am wrong) itoa() is implemented as outputing an int as string, but on i386 it=20 expects an int in host byte order. Contrary to this, the parameter is=20 still in network byte order (big endian output of getLong()), so the=20 output will be different on big endian and little endian=20 architectures. In short: ntohl() changes nothing in SPARC, but corrects the output on=20 i386. I hope I've clarified what I've done. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9chyMACgkQxMLs5v5/7eCmtACgqz91pJd0bfyFR9EPo5Nm0s7I BpwAn0ELqS1VGV3dlo6HucWDAHg7jyYY =3DcxVI =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Mon Sep 8 16:01:49 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 336211817C for ; Mon, 8 Sep 2003 16:01:49 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 053E84414; Mon, 8 Sep 2003 16:01:49 +0200 (CEST) Date: Mon, 8 Sep 2003 16:01:49 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030908140148.GA16028@outpost.ds9a.nl> References: <200309081309.26911.norbert@linuxnetworks.de> <20030908115652.GA11213@outpost.ds9a.nl> <200309081541.57297.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309081541.57297.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 14:01:49 -0000 On Mon, Sep 08, 2003 at 03:41:52PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Monday 08 September 2003 13:56, bert hubert wrote: > > > Here's a small patch to fix an endian problem in the getAnswers() > > > function. > > > > Can you explain to me how you think that this will not break pdns > > on little endian platforms? > > ntohl() is a standard macro provided on all systems which is defined > differently on big endian and little endian architectures. On big > endian architectures it does nothing while it resorts the bytes on > little endian architectures. So there was a problem on Intel but not on sparc? I thought the complaint was the other way around. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Mon Sep 8 18:07:16 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id AD6151805D for ; Mon, 8 Sep 2003 18:07:16 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h88G7FCf023248; Mon, 8 Sep 2003 18:07:15 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 8 Sep 2003 17:42:38 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200309081742.42933.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] Another SPARC and endian problem X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 16:07:17 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Probably I've found another line, which is a) bad for SPARC and b)=20 results in bad output: dnspacket.cc/expand()/line 109: unsigned int labelOffset=3D(n&~0xc0)*256+ (int)*(unsigned char *)p; It's probably unaligned and if the four byte number is in network byte=20 order (what I would expect if it is a packet from the network),=20 there's also a ntohl() missing. Furthermore u_int32_t would be better=20 than int, because int is of variable size on different architectures: u_int32_t labelOffset=3D(n&~0xc0)*256 + (u_int32_t) ntohl( getLong(p) ); Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9co3EACgkQxMLs5v5/7eARzwCgq4oLMY18z02ET8khdYTnJSL3 cOcAn3Y9iHD0hfOZLNC/x/11mXuHtD7Z =3DhOQG =2D----END PGP SIGNATURE----- From cmeerw@web.de Mon Sep 8 20:06:17 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 33685182A3 for ; Mon, 8 Sep 2003 20:06:17 +0200 (CEST) Received: from plenty.utanet.at ([213.90.36.9]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19wQOw-0005jz-00; Mon, 08 Sep 2003 20:06:10 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by plenty.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19wQOv-0004RH-00; Mon, 08 Sep 2003 20:06:09 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.22) id 19wQOr-0000Kw-Og; Mon, 08 Sep 2003 20:06:05 +0200 Date: Mon, 8 Sep 2003 20:06:05 +0200 From: Christof Meerwald To: Norbert Sendetzky Message-ID: <20030908180605.GA1288@hacking.cmeerw.net> References: <200309081309.26911.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309081309.26911.norbert@linuxnetworks.de> X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 18:06:17 -0000 On Mon, 8 Sep 2003 13:09:25 +0200, Norbert Sendetzky wrote: > Here's a small patch to fix an endian problem in the getAnswers()=20 > function. Have you checked (with a debugger or by adding debug output) that the original code is actually wrong and that your patch fixes the problem? getLong already takes care of byte-ordering issues on different platforms, so there is no need to call ntohl. > --- pdns-2.9.11.orig/pdns/dnspacket.cc Thu Mar 27 11:40:40 2003 > +++ pdns-2.9.11/pdns/dnspacket.cc Mon Sep 8 12:28:07 2003 > @@ -1217,11 +1217,11 @@ > // explicitly copy the SOA values out of the packet to avoid > // SPARC alignment issues. > > - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset )); > - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+4 )); > - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+8 )); > - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+12 )); > - rr.content+=" ";rr.content+=itoa(getLong( datapos+offset+16 )); > + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset ) ) ); > + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 4 ) ) ); > + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 8 ) ) ); > + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 12 ) ) ); > + rr.content += " "; rr.content += itoa( ntohl( getLong( datapos + offset + 16 ) ) ); bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From cmeerw@web.de Mon Sep 8 20:11:33 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from octopussy.utanet.at (octopussy.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 8FB43183CD for ; Mon, 8 Sep 2003 20:11:33 +0200 (CEST) Received: from pam.utanet.at ([213.90.36.6]) by octopussy.utanet.at with esmtp (Exim 4.12) id 19wQU9-0007kv-00; Mon, 08 Sep 2003 20:11:33 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by pam.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 19wQU9-0002j6-00; Mon, 08 Sep 2003 20:11:33 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.22) id 19wQU7-0000LC-V7; Mon, 08 Sep 2003 20:11:31 +0200 Date: Mon, 8 Sep 2003 20:11:31 +0200 From: Christof Meerwald To: Norbert Sendetzky Message-ID: <20030908181131.GA1301@hacking.cmeerw.net> References: <200309081742.42933.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309081742.42933.norbert@linuxnetworks.de> X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: Another SPARC and endian problem X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 18:11:33 -0000 On Mon, 8 Sep 2003 17:42:38 +0200, Norbert Sendetzky wrote: > Probably I've found another line, which is a) bad for SPARC and b) > results in bad output: > > dnspacket.cc/expand()/line 109: > unsigned int labelOffset=(n&~0xc0)*256+ (int)*(unsigned char *)p; > > It's probably unaligned and if the four byte number is in network byte > order (what I would expect if it is a packet from the network), I would agree if the original code would read unsigned int labelOffset=(n&~0xc0)*256+ *(int *)p; But, "(int)*(unsigned char *)p" is quite different from "*(int *)p". bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From ahu@outpost.ds9a.nl Mon Sep 8 20:16:38 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id D1FAE1806B for ; Mon, 8 Sep 2003 20:16:38 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id AD17A444F; Mon, 8 Sep 2003 20:16:09 +0200 (CEST) Date: Mon, 8 Sep 2003 20:16:09 +0200 From: bert hubert To: Christof Meerwald Subject: Re: [Pdns-dev] Re: Another SPARC and endian problem Message-ID: <20030908181609.GB23331@outpost.ds9a.nl> References: <200309081742.42933.norbert@linuxnetworks.de> <20030908181131.GA1301@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030908181131.GA1301@hacking.cmeerw.net> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 18:16:39 -0000 On Mon, Sep 08, 2003 at 08:11:31PM +0200, Christof Meerwald wrote: > > dnspacket.cc/expand()/line 109: > > unsigned int labelOffset=(n&~0xc0)*256+ (int)*(unsigned char *)p; > > I would agree if the original code would read > > unsigned int labelOffset=(n&~0xc0)*256+ *(int *)p; > > But, "(int)*(unsigned char *)p" is quite different from "*(int *)p". Christof is right. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From chris@munky.nodnol.org Mon Sep 8 20:36:18 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from munky.nodnol.org (munky.nodnol.org [62.169.139.122]) by spoon.powerdns.com (Postfix) with ESMTP id C774B17F81 for ; Mon, 8 Sep 2003 20:36:18 +0200 (CEST) Received: from chris by munky.nodnol.org with local (Exim 3.36 #3) id 19wQrx-0001Zs-00; Mon, 08 Sep 2003 19:36:09 +0100 Date: Mon, 8 Sep 2003 19:36:09 +0100 From: Chris Andrews To: bert hubert Subject: Re: [Pdns-dev] Re: [patch] dnspacket endian issue Message-ID: <20030908183609.GF17362@nodnol.org> References: <200309081309.26911.norbert@linuxnetworks.de> <20030908115652.GA11213@outpost.ds9a.nl> <200309081541.57297.norbert@linuxnetworks.de> <20030908140148.GA16028@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030908140148.GA16028@outpost.ds9a.nl> User-Agent: Mutt/1.4.1i Sender: Chris Andrews cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 18:36:19 -0000 On Mon, Sep 08, 2003 at 04:01:49PM +0200, bert hubert wrote: > On Mon, Sep 08, 2003 at 03:41:52PM +0200, Norbert Sendetzky wrote: > > On Monday 08 September 2003 13:56, bert hubert wrote: > > > > Here's a small patch to fix an endian problem in the getAnswers() > > > > function. > > > > > > Can you explain to me how you think that this will not break pdns > > > on little endian platforms? > > > > ntohl() is a standard macro provided on all systems which is defined > > differently on big endian and little endian architectures. On big > > endian architectures it does nothing while it resorts the bytes on > > little endian architectures. > > So there was a problem on Intel but not on sparc? I thought the complaint > was the other way around. My understanding of this was that my original patch which added getLong included the ntohl() calls being added here, but should not have. It had worked fine for me on Sparc (ntohl -> noop), but broke on Intel, so bert removed those calls before applying the patch. As far as I can see the code is correct as it stands. Apologies for any confusion caused. Chris. From norbert@linuxnetworks.de Mon Sep 8 22:31:40 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by spoon.powerdns.com (Postfix) with ESMTP id 9AB3418242 for ; Mon, 8 Sep 2003 22:31:40 +0200 (CEST) Received: from notebook.linuxnetworks.de (dialin.212.114.166.117.NEFkom.net [212.114.166.117]) by post.webmailer.de (8.12.9/8.8.7) with ESMTP id h88KVclP023936 for ; Mon, 8 Sep 2003 22:31:39 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS Developer Date: Mon, 8 Sep 2003 22:30:51 +0200 User-Agent: KMail/1.5.3 References: <200309081309.26911.norbert@linuxnetworks.de> <20030908180605.GA1288@hacking.cmeerw.net> In-Reply-To: <20030908180605.GA1288@hacking.cmeerw.net> MIME-Version: 1.0 Content-Description: clearsigned data Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200309082230.57109.norbert@linuxnetworks.de> Subject: [Pdns-dev] Re: [patch] dnspacket endian issue X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 20:31:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 08 September 2003 20:06, you wrote: > Have you checked (with a debugger or by adding debug output) that > the original code is actually wrong and that your patch fixes the > problem? Probably you are right. After adding the four values, byte order is irrelavant. The patch would therefore introduce a bug rather than fixing one. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9c5v8ACgkQxMLs5v5/7eDIhQCfbGepxms5iVH/cYe14Ibzz8xS 3wsAn0buBmH2VtEoafWEtmGKWpwxqZ9P =cUG/ -----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Tue Sep 16 20:49:10 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 60B9318188 for ; Tue, 16 Sep 2003 20:49:10 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id AF9A244C6; Tue, 16 Sep 2003 20:44:23 +0200 (CEST) Date: Tue, 16 Sep 2003 20:44:23 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030916184423.GA3143@outpost.ds9a.nl> References: <200309022313.48126.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309022313.48126.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: only-soa? X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 18:49:10 -0000 On Tue, Sep 02, 2003 at 11:13:41PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > What is the only-soa option for? The description in common-startup.cc > is obviously wrong: > > arg().set("only-soa","Make sure that no SOA serial is less than this > number")="org"; I removed this - it was an old TLD performance boost trick. Thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Tue Sep 16 22:21:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 26198181CA for ; Tue, 16 Sep 2003 22:21:54 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id EFA844481; Tue, 16 Sep 2003 22:21:53 +0200 (CEST) Date: Tue, 16 Sep 2003 22:21:53 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20030916202153.GA6681@outpost.ds9a.nl> References: <200309011549.32839.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309011549.32839.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] small cleanups X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 20:21:54 -0000 On Mon, Sep 01, 2003 at 03:49:30PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > I have two patches for you, removing two FIXMEs. The first one applied but the chopoff one did not. I'm doing that one myself. Thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From michel@powerdns.com Sun Sep 21 13:47:45 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from smtp4.wanadoo.nl (smtp4.wanadoo.nl [194.134.35.175]) by spoon.powerdns.com (Postfix) with ESMTP id 4EB9518123 for ; Sun, 21 Sep 2003 13:47:45 +0200 (CEST) Received: from stollie-1 (unknown [213.17.117.25]) by smtp4.wanadoo.nl (Postfix) with ESMTP id 945F241477; Sun, 21 Sep 2003 13:47:42 +0200 (CEST) To: "pdns-dev@mailman.powerdns.com" From: Michel Stol Content-Type: multipart/mixed; boundary="----------BR1FP6duNko3lS5VfM3l95" MIME-Version: 1.0 Date: Sun, 21 Sep 2003 13:46:58 +0200 Message-ID: User-Agent: Opera7.11/Win32 M2 build 2880 Subject: [Pdns-dev] Here is the generic SQLite backend, please test X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list Reply-To: michel@powerdns.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2003 11:47:45 -0000 ------------BR1FP6duNko3lS5VfM3l95 Content-Type: text/plain; charset=iso-8859-15; format=flowed Hello, Attached to this mail you'll find the files necessary to build the brand new generic SQLite backend and configure.in. The files should go in the modules/gsqlitebackend/ (except configure.in). You can find the library needed to build this backend on http://www.sqlite.org/ (or just apt if you use debian :)). Documentation has still to be written, but in short: - Create a database using: sqlite powerdns.sqlite - Create tables (yes, copy/pasted from the manual ;)) create table domains ( id INT auto_increment, name VARCHAR(255) NOT NULL, master VARCHAR(20) DEFAULT NULL, last_check INT DEFAULT NULL, type VARCHAR(6) NOT NULL, notified_serial INT DEFAULT NULL, account VARCHAR(40) DEFAULT NULL, primary key (id) ); CREATE UNIQUE INDEX name_index ON domains(name); CREATE TABLE records ( id INT auto_increment, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(6) DEFAULT NULL, content VARCHAR(255) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key(id) ); CREATE INDEX rec_name_index ON records(name); CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); create table supermasters ( ip VARCHAR(25) NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL ); - Fill the database with data; I used zone2sql to create gmysql output and then: cat zone2sql.output | sqlite powerdns.sqlite - Launch, and have fun testing: pdns_server --launch=gsqlite --gsqlite- database= Can you guys give it a go? I'm particulary interested in benchmarking results, and maybe some problems with AXFR (which is currently untested). Thanks in advance, - Michel Stol ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="OBJECTLIBS." Content-Type: application/octet-stream; name="OBJECTLIBS." Content-Transfer-Encoding: Base64 LWxzcWxpdGU= ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="gsqlitebackend.hh" Content-Type: application/octet-stream; name="gsqlitebackend.hh" Content-Transfer-Encoding: Base64 Ci8vCi8vIFNRTGl0ZSBiYWNrZW5kIGZvciBQb3dlckROUwovLyBDb3B5cmln aHQgKEMpIDIwMDMsIE1pY2hlbCBTdG9sIDxtaWNoZWxAcG93ZXJkbnMuY29t PgovLwoKI2lmbmRlZiBHU1FMSVRFQkFDS0VORF9ISAojZGVmaW5lIEdTUUxJ VEVCQUNLRU5EX0hICgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSAicGRu cy9iYWNrZW5kcy9nc3FsL2dzcWxiYWNrZW5kLmhoIgoKLy8hIFRoZSBnU1FM aXRlQmFja2VuZCByZXRyaWV2ZXMgaXQncyBkYXRhIGZyb20gYSBTUUxpdGUg ZGF0YWJhc2UgKGh0dHA6Ly93d3cuc3FsaXRlLm9yZy8pCmNsYXNzIGdTUUxp dGVCYWNrZW5kIDogcHVibGljIEdTUUxCYWNrZW5kCnsKcHJpdmF0ZToKcHJv dGVjdGVkOgpwdWJsaWM6CiAgLy8hIENvbnN0cnVjdHMgdGhlIGJhY2tlbmQs IHRocm93cyBhbiBleGNlcHRpb24gaWYgaXQgZmFpbGVkLi4KICBnU1FMaXRl QmFja2VuZCggY29uc3Qgc3RkOjpzdHJpbmcgJiBtb2RlLCBjb25zdCBzdGQ6 OnN0cmluZyAmIHN1ZmZpeCApOwoKfTsKCiNlbmRpZiAvLyBHU1FMSVRFQkFD S0VORF9ISAo= ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="OBJECTFILES." Content-Type: application/octet-stream; name="OBJECTFILES." Content-Transfer-Encoding: Base64 Z3NxbGl0ZWJhY2tlbmQubyBzc3FsaXRlLm8= ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="gsqlitebackend.cc" Content-Type: application/octet-stream; name="gsqlitebackend.cc" Content-Transfer-Encoding: Base64 Ci8vCi8vIFNRTGl0ZSBiYWNrZW5kIGZvciBQb3dlckROUwovLyBDb3B5cmln aHQgKEMpIDIwMDMsIE1pY2hlbCBTdG9sIDxtaWNoZWxAcG93ZXJkbnMuY29t PgovLwoKI2luY2x1ZGUgInBkbnMvdXRpbGl0eS5oaCIKI2luY2x1ZGUgPG1h cD4KI2luY2x1ZGUgPHNzdHJlYW0+CiNpbmNsdWRlIDxzdHJpbmc+CgojaW5j bHVkZSAicGRucy9kbnMuaGgiCiNpbmNsdWRlICJwZG5zL2Ruc2JhY2tlbmQu aGgiCiNpbmNsdWRlICJwZG5zL2Ruc3BhY2tldC5oaCIKI2luY2x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iAgICBCYWNrZW5kTWFrZXJzKCkucmVw b3J0KCBuZXcgZ1NRTGl0ZUZhY3RvcnkoICJnc3FsaXRlIiApKTsKICAgIEw8 PExvZ2dlcjo6V2FybmluZyA8PCAiVGhpcyBpcyBtb2R1bGUgZ3NxbGl0ZSBy ZXBvcnRpbmciIDw8IHN0ZDo6ZW5kbDsKICB9Cn07CgoKLy8hIFJlcG9ydHMg dGhlIGJhY2tlbmRsb2FkZXIgdG8gdGhlIFVlYmVyQmFja2VuZC4Kc3RhdGlj IGdTUUxpdGVMb2FkZXIgZ3NxbGl0ZWxvYWRlcjsKCg== ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="ssqlite.cc" Content-Type: application/octet-stream; name="ssqlite.cc" Content-Transfer-Encoding: Base64 Ci8vCi8vIFNRTGl0ZSBiYWNrZW5kIGZvciBQb3dlckROUwovLyBDb3B5cmln aHQgKEMpIDIwMDMsIE1pY2hlbCBTdG9sIDxtaWNoZWxAcG93ZXJkbnMuY29t PgovLwoKI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgInNzcWxpdGUuaGgi CgoKLy8gQ29uc3RydWN0b3IuClNTUUxpdGU6OlNTUUxpdGUoIGNvbnN0IHN0 ZDo6c3RyaW5nICYgZGF0YWJhc2UgKQp7CiAgLy8gT3BlbiB0aGUgZGF0YWJh c2UgY29ubmVjdGlvbi4KICBtX3BEQiA9IHNxbGl0ZV9vcGVuKCBkYXRhYmFz ZS5jX3N0cigpLCAwLCBOVUxMICk7CiAgaWYgKCBtX3BEQiA9PSBOVUxMICkK ICAgIHRocm93IHNQZXJyb3JFeGNlcHRpb24oICJDb3VsZCBub3QgY29ubmVj dCB0byB0aGUgU1FMaXRlIGRhdGFiYXNlIiApOwoKICBtX3BWTSA9IE5VTEw7 Cn0KCgovLyBEZXN0cnVjdG9yLgpTU1FMaXRlOjp+U1NRTGl0ZSggdm9pZCAp CnsKICBpZiAoIG1fcERCICkKICAgIHNxbGl0ZV9jbG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GF0YTsKICBjb25zdCBjaGFy ICoqcHBDb2x1bW5OYW1lczsKCiAgZG8KICB7CiAgICByYyA9IHNxbGl0ZV9z dGVwKCBtX3BWTSwgJm51bUNvbHMsICZwcERhdGEsICZwcENvbHVtbk5hbWVz ICk7CiAgICAKICAgIGlmICggcmMgPT0gU1FMSVRFX0JVU1kgKQogICAgewog ICAgICB1c2xlZXAoIDI1MCApOyAvLyBGSVhNRTogU2hvdWxkIHRoaXMgYmUg aW5jcmVhc2VkLCBkZWNyZWFzZWQsIG9yIGlzIGl0IEp1c3QgUmlnaHQ/IDop CiAgICAgIGNvbnRpbnVlOwogICAgfSAgIAogIH0gd2hpbGUgKCBmYWxzZSAp OwogIAogIGlmICggcmMgPT0gU1FMSVRFX1JPVyApCiAgewogICAgLy8gQW5v dGhlciByb3cgcmVjZWl2ZWQsIHByb2Nlc3MgaXQuCiAgICBmb3IgKCBpbnQg aSA9IDA7IGkgPCBudW1Db2xzOyBpKysgKQogICAgewogICAgICBpZiAoIHBw RGF0YVsgaSBdICkKICAgICAgICByb3cucHVzaF9iYWNrKCBwcERhdGFbIGkg XSApOwogICAgICBlbHNlCiAgICAgICAgcm93LnB1c2hfYmFjayggIiIgKTsg Ly8gTlVMTCB2YWx1ZS4KICAgIH0KICAgIAogICAgcmV0dXJuIHRydWU7CiAg fQogIAogIGlmICggcmMgPT0gU1FMSVRFX0RPTkUgKQogIHsKICAgIC8vIFdl J3JlIGRvbmUsIGNsZWFuIHVwLgogICAgc3FsaXRlX2ZpbmFsaXplKCBtX3BW TSwgTlVMTCApOwogICAgbV9wVk0gPSBOVUxMOwogICAgCiAgICByZXR1cm4g ZmFsc2U7CiAgfQogIAogIC8vIFNvbWV0aGluZyB3ZW50IHdyb25nLCBjb21w bGFpbi4KICB0aHJvdyBzUGVycm9yRXhjZXB0aW9uKCAiRXJyb3Igd2hpbGUg cmV0cmlldmluZyBTUUxpdGUgcXVlcnkgcmVzdWx0cyIgKTsKICAKICAvLyBQ cmV2ZW50IHNvbWUgY29tcGlsZXJzIGZyb20gY29tcGxhaW5pbmcuCiAgcmV0 dXJuIGZhbHNlOwp9CgoKLy8gRXNjYXBlIGEgU1FMIHF1ZXJ5LgpzdGQ6OnN0 cmluZyBTU1FMaXRlOjplc2NhcGUoIGNvbnN0IHN0ZDo6c3RyaW5nICYgbmFt ZSkKewogIHN0ZDo6c3RyaW5nIGE7CiAgCiAgICBmb3IoIHN0ZDo6c3RyaW5n Ojpjb25zdF9pdGVyYXRvciBpID0gbmFtZS5iZWdpbigpOyBpICE9IG5hbWUu ZW5kKCk7ICsraSApIAogICAgewogICAgICBpZiggKmkgPT0gJ1wnJyB8fCAq aSA9PSAnXFwnICkKICAgICAgICBhICs9ICdcXCc7CiAgICAgICAgCiAgICAg IGEgKz0gKmk7CiAgICB9CiAgICAKICByZXR1cm4gYTsKfQoK ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="ssqlite.hh" Content-Type: application/octet-stream; name="ssqlite.hh" Content-Transfer-Encoding: Base64 Ci8vCi8vIFNRTGl0ZSBiYWNrZW5kIGZvciBQb3dlckROUwovLyBDb3B5cmln aHQgKEMpIDIwMDMsIE1pY2hlbCBTdG9sIDxtaWNoZWxAcG93ZXJkbnMuY29t PgovLwoKI2lmbmRlZiBTU1FMSVRFX0hICiNkZWZpbmUgU1NRTElURV9ISAoK I2luY2x1ZGUgPHNxbGl0ZS5oPgojaW5jbHVkZSAicGRucy9iYWNrZW5kcy9n c3FsL3NzcWwuaGgiCgpjbGFzcyBTU1FMaXRlIDogcHVibGljIFNTcWwKewpw cml2YXRlOgogIC8vISBQb2ludGVyIHRvIHRoZSBTUUxpdGUgZGF0YWJhc2Ug aW5zdGFuY2UuCiAgc3FsaXRlICptX3BEQjsKCiAgLy8hIFBvaW50ZXIgdG8g dGhlIFNRTGl0ZSB2aXJ0dWFsIG1hY2hpbmUgZXhlY3V0aW5nIGEgcXVlcnku CiAgc3FsaXRlX3ZtICptX3BWTTsKICAKcHJvdGVjdGVkOgpwdWJsaWM6CiAg Ly8hIENvbnN0cnVjdG9yLgogIFNTUUxpdGUoIGNvbnN0IHN0ZDo6c3RyaW5n ICYgZGF0YWJhc2UgKTsKICAKICAvLyEgRGVzdHJ1Y3Rvci4KICB+U1NRTGl0 ZSggdm9pZCApOwogIAogIC8vISBQZXJmb3JtcyBhIHF1ZXJ5LgogIGludCBk b1F1ZXJ5KCBjb25zdCBzdGQ6OnN0cmluZyAmIHF1ZXJ5LCByZXN1bHRfdCAm IHJlc3VsdCApOwogIAogIC8vISBQZXJmb3JtcyBhIHF1ZXJ5LgogIGludCBk b1F1ZXJ5KCBjb25zdCBzdGQ6OnN0cmluZyAmIHF1ZXJ5ICk7CiAgCiAgLy8h IFJldHVybnMgYSByb3cgZnJvbSBhIHJlc3VsdCBzZXQuCiAgYm9vbCBnZXRS b3coIHJvd190ICYgcm93ICk7CiAgCiAgLy8hIEVzY2FwZXMgdGhlIFNRTCBx dWVyeS4KICBzdGQ6OnN0cmluZyBlc2NhcGUoIGNvbnN0IHN0ZDo6c3RyaW5n ICYgcXVlcnkgKTsKICAKICAvLyEgVXNlZCB0byBjcmVhdGUgYW4gYmFja2Vu ZCBzcGVjaWZpYyBleGNlcHRpb24gbWVzc2FnZS4KICBTU3FsRXhjZXB0aW9u IHNQZXJyb3JFeGNlcHRpb24oIGNvbnN0IHN0ZDo6c3RyaW5nICYgcmVhc29u ICk7CiAgCn07CgojZW5kaWYgLy8gU1NRTElURV9ISAoK ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="Makefile.am" Content-Type: application/octet-stream; name="Makefile.am" Content-Transfer-Encoding: Base64 bGliX0xUTElCUkFSSUVTID0gbGliZ3NxbGl0ZWJhY2tlbmQubGEKCkVYVFJB X0RJU1Q9T0JKRUNURklMRVMgT0JKRUNUTElCUwoKSU5DTFVERVM9LUlAU1FM SVRFX2luY2RpckAKCmxpYmdzcWxpdGViYWNrZW5kX2xhX1NPVVJDRVM9Z3Nx bGl0ZWJhY2tlbmQuY2MgZ3NxbGl0ZWJhY2tlbmQuaGggXAogICAgICAgICAg ICAgICAgc3NxbGl0ZS5oaCBzc3FsaXRlLmNjCgoKbGliZ3NxbGl0ZWJhY2tl bmRfbGFfTERGTEFHUz0tbW9kdWxlIC1sc3FsaXRlCg== ------------BR1FP6duNko3lS5VfM3l95 Content-Disposition: attachment; filename="configure.in" Content-Type: application/octet-stream; name="configure.in" Content-Transfer-Encoding: Base64 ZG5sIGludHJvCkFDX0lOSVQocGRucy9yZWNlaXZlci5jYykKQU1fSU5JVF9B VVRPTUFLRShwZG5zLCAyLjkuMTEpCkFDX0NBTk9OSUNBTF9IT1NUCkFNX0NP TkZJR19IRUFERVIoY29uZmlnLmgpCkFDX0NfQklHRU5ESUFOIApBQ19QUkVS RVEoMi41MikKQ1hYRkxBR1M9IiRDWFhGTEFHUyAtV2FsbCAtTzIiCgpBQ19Q UkVGSVhfREVGQVVMVCgvdXNyL2xvY2FsKQpBQ19QUk9HX0NDCkFDX1BST0df Q1hYCkFDX1BST0dfWUFDQwpBTV9QUk9HX0xFWApBQ19QUk9HX0lOU1RBTEwK QUNfUFJPR19NQUtFX1NFVApBTV9QUk9HX0xJQlRPT0wgCkFDX0xBTkdfQ1BM VVNQTFVTCgpkbmwgQ2hlY2tzIGZvciBoZWFkZXIgZmlsZXMuCkFDX0hFQURF Ul9TVERDCkFDX0NIRUNLX0hFQURFUlMoZmNudGwuaCBnZXRvcHQuaCBsaW1p dHMuaCBzdHJpbmdzLmggc3lzL3RpbWUuaCBzeXNsb2cuaCB1bmlzdGQuaCkK CmRubCBDaGVja3MgZm9yIHR5cGVkZWZzLCBzdHJ1Y3R1cmVzLCBhbmQgY29t cGlsZXIgY2hhcmFjdGVyaXN0aWNzLgpBQ19UWVBFX1NJWkVfVApBQ19IRUFE RVJfVElNRQpBQ19TVFJVQ1RfVE0KCmRubCBDaGVja3MgZm9yIGxpYnJhcnkg ZnVuY3Rpb25zLgpBQ19UWVBFX1N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gICAgIFNRTElURV9saWJkaXI9CiAg ICAgICAgZm9yIG0gaW4gJFNRTElURV9saWJfY2hlY2s7IGRvCiAgICAgICAg ICAgICAgICBpZiB0ZXN0IC1kICIkbSIgJiYgXAogICAgICAgICAgICAgICAg ICAgKHRlc3QgLWYgIiRtL2xpYnNxbGl0ZS5zbyIgfHwgdGVzdCAtZiAiJG0v bGlic3FsaXRlLmEiKQogICAgICAgICAgICAgICAgdGhlbgogICAgICAgICAg ICAgICAgICAgICAgICBTUUxJVEVfbGliZGlyPSRtCiAgICAgICAgICAgICAg ICAgICAgICAgIGJyZWFrCiAgICAgICAgICAgICAgICBmaQogICAgICAgIGRv bmUKICAgICAgICAgICAgICAgIGlmIHRlc3QgLXogIiRTUUxJVEVfbGliZGly IjsgdGhlbgogICAgICAgICAgICAgICAgQUNfTVNHX0VSUk9SKFtEaWRuJ3Qg ZmluZCB0aGUgc3FsaXRlIGxpYnJhcnkgZGlyIGluICckU1FMSVRFX2xpYl9j aGVjayddKQogICAgICAgIGZpCiAgICAgICAgY2FzZSAiJFNRTElURV9saWJk aXIiIGluCiAgICAgICAgICAgL3Vzci9saWIgKSBTUUxJVEVfbGliPSIiIDs7 CiAgICAgICAgICAvKiApIFNRTElURV9saWI9Ii1MJFNRTElURV9saWJkaXIg LVdsLC1ycGF0aCwkU1FMSVRFX2xpYmRpciIKICAgICAgICAgICAgICAgTERG TEFHUz0iJFNRTElURV9saWIgJExERkxBR1MiCiAgICAgICAgICAgICAgIDs7 CiAgICAgICAgICAqICkgIEFDX01TR19FUlJPUihbVGhlIFNRTGl0ZSBsaWJy YXJ5IGRpcmVjdG9yeSAoJFNRTElURV9saWJkaXIpIG11c3QgYmUgYW4gYWJz b2x1dGUgcGF0aC5dKSA7OwogICAgICAgIGVzYWMKCiAgICAgICAgQUNfU1VC U1QoU1FMSVRFX2xpYikKICAgICAgICBBQ19NU0dfUkVTVUxUKFskU1FMSVRF X2xpYmRpcl0pCiAgICAgICAgICAgICAgICBBQ19NU0dfQ0hFQ0tJTkcoW2Zv ciBTUUxpdGUgaW5jbHVkZSBkaXJlY3RvcnldKQogICAgICAgIFNRTElURV9p bmNkaXI9CiAgICAgICAgZm9yIG0gaW4gJFNRTElURV9pbmNfY2hlY2s7IGRv CiAgICAgICAgICAgICAgICBpZiB0ZXN0IC1kICIkbSIgJiYgdGVzdCAtZiAi JG0vc3FsaXRlLmgiCiAgICAgICAgICAgICAgICB0aGVuCiAgICAgICAgICAg ICAgICAgICAgICAgIFNRTElURV9pbmNkaXI9JG0KICAgICAgICAgICAgICAg ICAgICAgICAgYnJlYWsKICAgICAgICAgICAgICAgIGZpCiAgICAgICAgZG9u ZQogICAgICAgICAgICAgICAgaWYgdGVzdCAteiAiJFNRTElURV9pbmNkaXIi OyB0aGVuCiAgICAgICAgICAgICAgICBBQ19NU0dfRVJST1IoW0RpZG4ndCBm aW5kIHRoZSBTUUxpdGUgaW5jbHVkZSBkaXIgaW4gJyRTUUxJVEVfaW5jX2No ZWNrJ10pCiAgICAgICAgZmkKICAgICAgICBjYXNlICIkU1FMSVRFX2luY2Rp ciIgaW4KICAgICAgICAgIC8qICkgOzsKICAgICAgICAgICogKSAgQUNfTVNH X0VSUk9SKFtUaGUgU1FMaXRlIGluY2x1ZGUgZGlyZWN0b3J5ICgkU1FMSVRF X2luY2RpcikgbXVzdCBiZSBhbiBhYnNvbHV0ZSBwYXRoLl0pIDs7CiAgICAg ICAgZXNhYwogICAgICAgIEFDX1NVQlNUKFNRTElURV9pbmNkaXIpCiAgICAg ICAgQUNfTVNHX1JFU1VMVChbJFNRTElURV9pbmNkaXJdKQoKIyAgICAgICBM SUJTPSIkTElCUyAtbHNxbGl0ZSIKZmkKCgpmb3IgYSBpbiAkbW9kdWxlcwpk bwogICAgICAgIG1vZHVsZWRpcnM9IiRtb2R1bGVkaXJzICR7YX1iYWNrZW5k IgoKCWZvciBiIGluIGBjYXQgJHNyY2Rpci9tb2R1bGVzLyR7YX1iYWNrZW5k L09CSkVDVEZJ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19:52:09 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 1A7CB17FE2; Thu, 2 Oct 2003 19:52:09 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id DFE824433; Thu, 2 Oct 2003 19:52:08 +0200 (CEST) Date: Thu, 2 Oct 2003 19:52:08 +0200 From: bert hubert To: pdns-dev@mailman.powerdns.com, pdns-users@mailman.powerdns.com Message-ID: <20031002175208.GB29368@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Subject: [Pdns-dev] 2.9.12 delayed because of bugs in the assembler X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 17:52:09 -0000 Dear PowerDNS users, The formal release of pdns 2.9.12 is held up by: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212048 and http://sources.redhat.com/ml/binutils/2003-10/msg00055.html Which makes it very hard for me to do a binary release. We'll monitor this situation for a few days and then try building on another Linux distribution. In the meantime, what will most likely become 2.9.12 is on http://ds9a.nl/pdns/pdns-2.9.12.tar.gz Changelog: Release rich in features. Work on Verisign oddities, addition of SQLite backend, pdns_recursor maturity. New features: * --version command (requested by Mike Benoit) * delegation-only, a Verisign special. * Generic SQLite support, by Michel 'Who da man?' Stol. * init.d script for pdns_recursor Bugs: * 0.0.0.0/0 didn't use to work (Norbert Sendetzky) * pdns_recursor would try to resolve IP address which to bind to, potentially causing chicken/egg problem * gpgsql no longer reports as gmysql (Sherwin Daganoto) * SRV would not be parsed right from disk (Christof Meerwald) * An AXFR from a zone hosted on the LDAP backend no longer transmits all the reverse entries too (Norbert Sendetzky) Improvements, cleanups: * PowerDNS now reports the numerical IP addresses it binds to instead of the, possibly, alphanumeric names the operator passed. * Removed only-soa hackery (noticed by Norbert Sendetzky) * Debian packaging fixes (Wichert Akkerman) * Some parameter descriptions were improved. * Cleanups by Norbert: getAuth moved to chopOff, arguments::contains massive cleanup, more. Thanks for your patience! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Fri Oct 3 15:19:35 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.webmailer.de (natsmtp01.webmailer.de [192.67.198.81]) by spoon.powerdns.com (Postfix) with ESMTP id 79EC91813C for ; Fri, 3 Oct 2003 15:19:35 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0136.pppool.de [213.7.1.54]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h93DJVUE000011; Fri, 3 Oct 2003 15:19:31 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] 2.9.12 delayed Date: Fri, 3 Oct 2003 15:15:22 +0200 User-Agent: KMail/1.5.4 References: <20031002175208.GB29368@outpost.ds9a.nl> In-Reply-To: <20031002175208.GB29368@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_qZXf/IJdYLr13D8" Message-Id: <200310031515.34220.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2003 13:19:35 -0000 --Boundary-00=_qZXf/IJdYLr13D8 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert A few things for the next version: =2D - packethandler.cc, line 189 (delete the debug line) =2D - you forgot the default-ttl patch (attached, default ttl for all=20 backends, if not set by the record in the database) =2D - you forgot the toUpper() patch (attached, streamlines upperCase() to= =20 toUpper()) =46urthermore I will send you a complete diff to my current=20 ldapbackend.cc if you applied the above patches (the changes depend=20 on them). Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj99dnMACgkQxMLs5v5/7eC3LQCghaUL83jf+1uYKmppOK9iZjKD HVEAn2VhSExpNxLHNvd+1b+fqdR+d3dH =3D+Kmh =2D----END PGP SIGNATURE----- --Boundary-00=_qZXf/IJdYLr13D8 Content-Type: text/x-diff; charset="iso-8859-1"; name="default_ttl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="default_ttl.diff" --- pdns-2.9.12.orig/pdns/common_startup.cc Tue Sep 16 20:49:46 2003 +++ pdns-2.9.12/pdns/common_startup.cc Fri Oct 3 15:08:29 2003 @@ -100,6 +100,7 @@ arg().set("negquery-cache-ttl","Seconds to store packets in the PacketCache")="60"; arg().set("query-cache-ttl","Seconds to store packets in the PacketCache")="20"; arg().set("soa-minimum-ttl","Default SOA mininum ttl")="3600"; + arg().set("default-ttl","Seconds a result is valid if not set otherwise")="3600"; arg().set("max-tcp-connections","Maximum number of TCP connections")="10"; arg().setSwitch( "use-logfile", "Use a log file" )= "no"; --Boundary-00=_qZXf/IJdYLr13D8 Content-Type: text/x-diff; charset="iso-8859-1"; name="toUpper.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="toUpper.diff" --- pdns-2.9.11.orig/pdns/misc.hh Sun Aug 31 21:50:00 2003 +++ pdns-2.9.11/pdns/misc.hh Tue Sep 2 10:34:42 2003 @@ -76,7 +76,6 @@ return (p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]; } -void upperCase(string& s); struct ServiceTuple { @@ -159,6 +158,17 @@ for(unsigned int i = 0; i < reply.length(); i++) reply[i] = tolower(reply[i]); return reply; +} + + +// Make s uppercase: +inline string toUpper( const string& s ) +{ + string r(s); + for( unsigned int i = 0; i < s.length(); i++ ) { + r[i] = toupper( r[i] ); + } + return r; } --- pdns-2.9.11.orig/pdns/misc.cc Sun Aug 31 21:50:00 2003 +++ pdns-2.9.11/pdns/misc.cc Tue Sep 2 10:20:30 2003 @@ -201,12 +201,6 @@ return d_set.tv_sec; } -// Make s uppercase: -void upperCase(string& s) { - for(unsigned int i = 0; i < s.length(); i++) - s[i] = toupper(s[i]); -} - void chomp(string &line, const string &delim) { --- pdns-2.9.11.orig/pdns/dynlistener.cc Mon Dec 30 23:53:41 2002 +++ pdns-2.9.11/pdns/dynlistener.cc Tue Sep 2 00:23:41 2003 @@ -206,7 +206,7 @@ sendLine("Empty line"); continue; } - upperCase(parts[0]); + parts[0] = toUpper( parts[0] ); if(!d_funcdb[parts[0]]) { if(d_restfunc) sendLine((*d_restfunc)(parts,d_ppid)); --Boundary-00=_qZXf/IJdYLr13D8-- From cmeerw@web.de Fri Oct 3 22:36:15 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from tatiana.utanet.at (tatiana.utanet.at [213.90.36.46]) by spoon.powerdns.com (Postfix) with ESMTP id 9346418022 for ; Fri, 3 Oct 2003 22:36:15 +0200 (CEST) Received: from pam.utanet.at ([213.90.36.6]) by tatiana.utanet.at with esmtp (Exim 4.12) id 1A5Weo-0004dR-00; Fri, 03 Oct 2003 22:36:10 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by pam.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 1A5Wen-0006sh-00; Fri, 03 Oct 2003 22:36:10 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.22) id 1A5Wek-0001IM-RP; Fri, 03 Oct 2003 22:36:06 +0200 Date: Fri, 3 Oct 2003 22:36:06 +0200 From: Christof Meerwald To: bert hubert Message-ID: <20031003203606.GA4948@hacking.cmeerw.net> References: <20031002175208.GB29368@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031002175208.GB29368@outpost.ds9a.nl> X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: 2.9.12 delayed because of bugs in the assembler X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2003 20:36:15 -0000 On Thu, 2 Oct 2003 19:52:08 +0200, bert hubert wrote: > The formal release of pdns 2.9.12 is held up by: [...] > Changelog: [...] > * pdns_recursor would try to resolve IP address which to bind to, > potentially causing chicken/egg problem Please have another look at the code and give it a second thought: bool IpToU32(const string &str, u_int32_t *ip) { int a,b,c,d; if(sscanf(str.c_str(),"%d.%d.%d.%d",&a, &b, &c, &d)!=4) return false; *ip++=a; *ip++=b; *ip++=c; *ip++=d; return true; } Obviously, this code is wrong and I wonder why inet_aton is not used instead. bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From ahu@outpost.ds9a.nl Fri Oct 3 23:31:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 6E0C018238 for ; Fri, 3 Oct 2003 23:31:53 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 6094D442F; Fri, 3 Oct 2003 23:31:53 +0200 (CEST) Date: Fri, 3 Oct 2003 23:31:53 +0200 From: bert hubert To: Christof Meerwald Message-ID: <20031003213153.GA805@outpost.ds9a.nl> References: <20031002175208.GB29368@outpost.ds9a.nl> <20031003203606.GA4948@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003203606.GA4948@hacking.cmeerw.net> User-Agent: Mutt/1.3.28i cc: pdns-dev@mailman.powerdns.com Subject: [Pdns-dev] Re: 2.9.12 delayed because of bugs in the assembler X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2003 21:31:53 -0000 On Fri, Oct 03, 2003 at 10:36:06PM +0200, Christof Meerwald wrote: > Please have another look at the code and give it a second thought: Thanks for spotting this. Must've been a pretty bad brainfart. I even remember testing this. Doh. New version, please check: bool IpToU32(const string &str, u_int32_t *ip) { struct in_addr inp; if(inet_aton(str.c_str(), &inp)) { *ip=inp.s_addr; return true; } return false; } -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From cmeerw@web.de Sat Oct 4 09:04:49 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from taro.utanet.at (taro.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id EF46F181E7 for ; Sat, 4 Oct 2003 09:04:48 +0200 (CEST) Received: from pam.utanet.at ([213.90.36.6]) by taro.utanet.at with esmtp (Exim 4.12) id 1A5gTA-00008e-00 for pdns-dev@mailman.powerdns.com; Sat, 04 Oct 2003 09:04:48 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by pam.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 1A5gTA-00063t-00 for pdns-dev@mailman.powerdns.com; Sat, 04 Oct 2003 09:04:48 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.22) id 1A5gT8-0002ym-52 for pdns-dev@mailman.powerdns.com; Sat, 04 Oct 2003 09:04:46 +0200 Date: Sat, 4 Oct 2003 09:04:46 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20031004070445.GA11398@hacking.cmeerw.net> References: <20031003213153.GA805@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003213153.GA805@outpost.ds9a.nl> X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i Subject: [Pdns-dev] Re: 2.9.12 delayed because of bugs in the assembler X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2003 07:04:49 -0000 On Fri, 3 Oct 2003 23:31:53 +0200, bert hubert wrote: > On Fri, Oct 03, 2003 at 10:36:06PM +0200, Christof Meerwald wrote: >> Please have another look at the code and give it a second thought: > Thanks for spotting this. Must've been a pretty bad brainfart. I even > remember testing this. > > Doh. > > New version, please check: Well, but IMHO IpToU32 doesn't server any useful purpose, so I would rather completely remove it and invoke Utility::inet_aton in pdns_recursor.cc directly. Use if(!Utility::inet_aton(arg()["local-address"].c_str(), &sin.sin_addr)) instead of the call to IpToU32 in makeTCPServerSocket and makeServerSocket. bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de From ahu@outpost.ds9a.nl Sun Oct 5 17:47:17 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id E754317FA1 for ; Sun, 5 Oct 2003 17:47:17 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id C22FC4028; Sun, 5 Oct 2003 17:47:17 +0200 (CEST) Date: Sun, 5 Oct 2003 17:47:17 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] 2.9.12 delayed Message-ID: <20031005154717.GA3488@outpost.ds9a.nl> References: <20031002175208.GB29368@outpost.ds9a.nl> <200310031515.34220.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310031515.34220.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2003 15:47:18 -0000 On Fri, Oct 03, 2003 at 03:15:22PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > A few things for the next version: > - - packethandler.cc, line 189 (delete the debug line) > - - you forgot the default-ttl patch (attached, default ttl for all > backends, if not set by the record in the database) > - - you forgot the toUpper() patch (attached, streamlines upperCase() to > toUpper()) All done, thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sun Oct 5 18:21:00 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 2DCFF181A9 for ; Sun, 5 Oct 2003 18:21:00 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0112.pppool.de [213.7.1.18]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h95GKsln029536; Sun, 5 Oct 2003 18:20:55 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sun, 5 Oct 2003 18:19:56 +0200 User-Agent: KMail/1.5.4 References: <20031002175208.GB29368@outpost.ds9a.nl> <200310031515.34220.norbert@linuxnetworks.de> <20031005154717.GA3488@outpost.ds9a.nl> In-Reply-To: <20031005154717.GA3488@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_sSEg/J8BnsS1SAc" Message-Id: <200310051820.07348.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] ldap patch for 2.9.12 X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2003 16:21:00 -0000 --Boundary-00=_sSEg/J8BnsS1SAc Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 05 October 2003 17:47, bert hubert wrote: [patches] > All done, thanks. Ok, so here's the big ldap patch: - - Support for multiple ldap server - - Reconnect on connection loss (for fail-over) - - No more extensive logging to syslog - - ldap-port and ldap-default-ttl options set to depricated - - Minor improvements Thanks in advace Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+ARLAACgkQxMLs5v5/7eBEegCcD7P4EpMeNGcOwnlEGOvL/eYp BFAAnA+VTEt4mr3K7Et3WSjlTvmfAFXg =Ip40 -----END PGP SIGNATURE----- --Boundary-00=_sSEg/J8BnsS1SAc Content-Type: text/x-diff; charset="iso-8859-1"; name="ldapbackend.cc.2.9.12-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend.cc.2.9.12-1.diff" --- pdns-2.9.12/modules/ldapbackend/ldapbackend.cc Sat Aug 30 13:31:03 2003 +++ pdns-2.9.11/modules/ldapbackend/ldapbackend.cc Sat Oct 4 18:51:15 2003 @@ -23,25 +23,26 @@ -static int Toupper(int c) -{ - return toupper(c); -} - - LdapBackend::LdapBackend( const string &suffix ) { - m_msgid = 0; - m_qname = ""; + unsigned int i; setArgPrefix( "ldap" + suffix ); + string hosts = getArg( "host" ); - - m_default_ttl = (u_int32_t) strtol( getArg( "default-ttl" ).c_str(), NULL, 10 ); + m_msgid = 0; + m_qname = ""; + m_default_ttl = arg().asNum( "default-ttl" ); try { - L << Logger::Info << backendname << " LDAP Server = " << getArg( "host" ) << ":" << getArg( "port" ) << endl; - m_pldap = new PowerLDAP( getArg( "host" ), (u_int16_t) atoi( getArg( "port" ).c_str() ) ); + for( i = 0; i < hosts.length(); i++ ) + { + if( hosts[i] == ',' ) { hosts[i] = ' '; } + } + + L << Logger::Info << backendname << " LDAP servers = " << hosts << endl; + + m_pldap = new PowerLDAP( hosts.c_str(), atoi( getArg( "port" ).c_str() ) ); m_pldap->simpleBind( getArg( "binddn" ), getArg( "secret" ) ); } catch( LDAPException &e ) @@ -70,8 +71,6 @@ try { - L << Logger::Notice << backendname << " AXFR request for " << target << endl; - // search for DN of SOA record which is SOA for target zone filter = "(&(associatedDomain=" + target + ")(SOARecord=*))"; @@ -83,7 +82,7 @@ return false; } - if( m_result.empty() || m_result.find( "dn" ) == m_result.end() || m_result["dn"].empty() ) + if( m_result.empty() || !m_result.count( "dn" ) || m_result["dn"].empty() ) { L << Logger::Error << backendname << " No SOA record for " << target << endl; return false; @@ -94,15 +93,22 @@ // list all records one level below but not entries containing SOA records (these are seperate zones) + DLOG( L << Logger::Debug << backendname << " List = target: " << target << ", basedn: = " << dn << endl ); + m_qname = ""; m_adomain = m_adomains.end(); // skip loops in get() first time filter = "(&(associatedDomain=*" + target + ")(!(SOARecord=*)))"; m_msgid = m_pldap->search( dn, LDAP_SCOPE_ONELEVEL, filter, (const char**) attrany ); } + catch( LDAPTimeout < ) + { + L << Logger::Error << backendname << " Unable to get zone " + target + " from LDAP directory: " << lt.what() << endl; + return false; + } catch( LDAPException &le ) { L << Logger::Error << backendname << " Unable to get zone " + target + " from LDAP directory: " << le.what() << endl; - return false; + throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( exception &e ) { @@ -132,12 +138,12 @@ { m_qtype = qtype; m_qname = qname; - qesc = m_pldap->escape( qname ); + qesc = toLower( m_pldap->escape( qname ) ); if( mustDo( "disable-ptrrecord" ) ) // PTRRecords will be derived from ARecords { - len = qesc.length(); stringtok( parts, qesc, "." ); + len = qesc.length(); if( parts.size() == 6 && len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups { @@ -175,15 +181,21 @@ } } + DLOG( L << Logger::Debug << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + m_adomain = m_adomains.end(); // skip loops in get() first time - L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); } - catch( LDAPException &le ) + catch( LDAPTimeout < ) { - L << Logger::Warning << backendname << " Unable to search LDAP directory: " << le.what() << endl; + L << Logger::Error << backendname << " Unable to search LDAP directory: " << lt.what() << endl; return; } + catch( LDAPException &le ) + { + L << Logger::Error << backendname << " Unable to search LDAP directory: " << le.what() << endl; + throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server + } catch( exception &e ) { L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; @@ -214,8 +226,7 @@ { attrname = m_attribute->first; qstr = attrname.substr( 0, attrname.length() - 6 ); // extract qtype string from ldap attribute name - transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper ); - qt = QType( const_cast(qstr.c_str()) ); + qt = QType( const_cast(toUpper( qstr ).c_str()) ); while( m_value != m_attribute->second.end() ) { @@ -244,7 +255,7 @@ rr.content = content; m_value++; - L << Logger::Info << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl; + DLOG( L << Logger::Debug << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl ); return true; } @@ -260,9 +271,14 @@ while( m_pldap->getSearchEntry( m_msgid, m_result, false ) && prepareEntry() ); } + catch( LDAPTimeout < ) + { + L << Logger::Error << backendname << " Search failed: " << lt.what() << endl; + } catch( LDAPException &le ) { - L << Logger::Warning << backendname << " Search failed: " << le.what() << endl; + L << Logger::Error << backendname << " Search failed: " << le.what() << endl; + throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( exception &e ) { @@ -301,7 +317,7 @@ m_adomains.clear(); m_ttl = m_default_ttl; - if( m_result.find( "dNSTTL" ) != m_result.end() && !m_result["dNSTTL"].empty() ) + if( m_result.count( "dNSTTL" ) && !m_result["dNSTTL"].empty() ) { m_ttl = (u_int32_t) strtol( m_result["dNSTTL"][0].c_str(), NULL, 10 ); m_result.erase( "dNSTTL" ); @@ -310,7 +326,7 @@ if( !m_qname.empty() ) // request was a normal lookup() { m_adomains.push_back( m_qname ); - if( m_result.find( "associatedDomain" ) != m_result.end() ) + if( m_result.count( "associatedDomain" ) ) { m_result["PTRRecord"] = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); @@ -318,7 +334,7 @@ } else // request was a list() for AXFR { - if( m_result.find( "associatedDomain" ) != m_result.end() ) + if( m_result.count( "associatedDomain" ) ) { m_adomains = m_result["associatedDomain"]; m_result.erase( "associatedDomain" ); @@ -342,13 +358,13 @@ void declareArguments( const string &suffix="" ) { - declare( suffix, "host", "your ldap server","localhost" ); - declare( suffix, "port", "ldap server port","389" ); + declare( suffix, "host", "one or more ldap server","localhost:389" ); + declare( suffix, "port", "ldap server port (depricated, use ldap-host)","389" ); declare( suffix, "basedn", "search root in ldap tree (must be set)","" ); declare( suffix, "binddn", "user dn for non anonymous binds","" ); declare( suffix, "secret", "user password for non anonymous binds", "" ); declare( suffix, "disable-ptrrecord", "disable necessity for seperate PTR records", "no" ); - declare( suffix, "default-ttl", "default ttl if DNSTTL is not set", "86400" ); + declare( suffix, "default-ttl", "default ttl if DNSTTL is not set (depricated, use default-ttl)", "3600" ); } @@ -369,7 +385,7 @@ Loader() { BackendMakers().report( new LdapFactory ); - L << Logger::Notice << backendname << " This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl; + L << Logger::Info << backendname << " This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl; } }; --Boundary-00=_sSEg/J8BnsS1SAc-- From norbert@linuxnetworks.de Fri Oct 10 17:14:49 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 9FCE5181EA for ; Fri, 10 Oct 2003 17:14:49 +0200 (CEST) Received: from notebook.linuxnetworks.de (B0120.b.pppool.de [213.7.1.32]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9AFEkC3024472; Fri, 10 Oct 2003 17:14:47 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Fri, 10 Oct 2003 17:13:03 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Aysh/Pqqk0hirJn" Message-Id: <200310101713.09823.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] soa canonic X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 15:14:49 -0000 --Boundary-00=_Aysh/Pqqk0hirJn Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The attached patch makes all strings in soa records canonic. I think=20 to remember that somebody else pointed to this a few month ago. Open issue: What if first string is "ns" instead of "ns.example.org."? How can it=20 be expanded to the FQDN? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+GzIMACgkQxMLs5v5/7eClawCePUN+2gr/6KwFMiv00MRKH6ZF PAcAn2OxZhFKlxaCRsmzeVEvLMCJQY85 =3DOsn0 =2D----END PGP SIGNATURE----- --Boundary-00=_Aysh/Pqqk0hirJn Content-Type: text/x-diff; charset="iso-8859-15"; name="soacanonic.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="soacanonic.diff" --- pdns-2.9.12.orig/pdns/backends/bind/zoneparser2.cc Sat Aug 30 14:34:45 2003 +++ pdns-2.9.12/pdns/backends/bind/zoneparser2.cc Fri Oct 10 16:11:27 2003 @@ -322,13 +322,14 @@ int pos=0; // 'ns.naamserver.net. hostmaster.naamserver.net 2001102501 8H 2H 1W 1D' + // FIXME: what about 'ns hostmaster.naamserver.net 2001102501 8H 2H 1W 1D'? string newcontent; for(vector::const_iterator i=parts.begin();i!=parts.end();++i,++pos) { if(pos<3) { if(pos) newcontent.append(1,' '); - newcontent.append(*i); + newcontent.append( canonic( *i ) ); } else { unsigned int val=zoneNumber(*i); --Boundary-00=_Aysh/Pqqk0hirJn-- From cmeerw@web.de Sat Oct 11 21:51:22 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from taro.utanet.at (taro.utanet.at [213.90.36.45]) by spoon.powerdns.com (Postfix) with ESMTP id 8844B18134 for ; Sat, 11 Oct 2003 21:51:22 +0200 (CEST) Received: from paris.utanet.at ([213.90.36.7]) by taro.utanet.at with esmtp (Exim 4.12) id 1A8Plk-0004V3-00 for pdns-dev@mailman.powerdns.com; Sat, 11 Oct 2003 21:51:16 +0200 Received: from [62.218.246.52] (helo=hacking.cmeerw.net) by paris.utanet.at with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.12) id 1A8Plk-0002kH-00 for pdns-dev@mailman.powerdns.com; Sat, 11 Oct 2003 21:51:17 +0200 Received: from cmeerw by hacking.cmeerw.net with local (Exim 4.22) id 1A8Plf-0001YM-Ja for pdns-dev@mailman.powerdns.com; Sat, 11 Oct 2003 21:51:11 +0200 Date: Sat, 11 Oct 2003 21:51:11 +0200 From: Christof Meerwald To: pdns-dev@mailman.powerdns.com Message-ID: <20031011195111.GA5963@hacking.cmeerw.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline X-PGP-Key: 1024D/2B10BE68, 1998-06-29 X-PGP-Fingerprint: 0289 5466 C1F5 B03C DBA7 6304 8CAF 9782 2B10 BE68 User-Agent: Mutt/1.5.4i Subject: [Pdns-dev] Additional processing for SRV records X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 19:51:22 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, here is a patch to add additional processing for SRV records (see RFC 2782: "... Implementors are urged, but not required, to return the address record(s) in the Additional Data section. ..." bye, Christof -- http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pdns-2.9.12.diff" diff -ur pdns-2.9.12.orig/pdns/dnspacket.cc pdns-2.9.12/pdns/dnspacket.cc --- pdns-2.9.12.orig/pdns/dnspacket.cc Thu Mar 27 11:40:40 2003 +++ pdns-2.9.12/pdns/dnspacket.cc Sat Oct 11 21:26:35 2003 @@ -896,7 +896,8 @@ { if(i->d_place!=DNSResourceRecord::ADDITIONAL && ( (i->qtype.getCode()==QType::NS && i->content.find('@')==string::npos) || // NS records with @ in them are processed - i->qtype.getCode()==QType::MX )) + i->qtype.getCode()==QType::MX || + i->qtype.getCode()==QType::SRV)) { return true; } @@ -913,8 +914,9 @@ ++i) { if(i->d_place!=DNSResourceRecord::ADDITIONAL && - (i->qtype.getCode()==15 || - i->qtype.getCode()==2 )) // CNAME or MX or NS + (i->qtype.getCode()==QType::MX || + i->qtype.getCode()==QType::NS || + i->qtype.getCode()==QType::SRV)) { arrs.push_back(&*i); } diff -ur pdns-2.9.12.orig/pdns/packethandler.cc pdns-2.9.12/pdns/packethandler.cc --- pdns-2.9.12.orig/pdns/packethandler.cc Tue Sep 16 23:02:35 2003 +++ pdns-2.9.12/pdns/packethandler.cc Sat Oct 11 21:21:38 2003 @@ -282,7 +282,18 @@ QType qtypes[2]; qtypes[0]="A"; qtypes[1]="AAAA"; for(int n=0;n < d_doIPv6AdditionalProcessing + 1; ++n) { - B.lookup(qtypes[n],i->content,p); + if (i->qtype.getCode()==QType::SRV) { + vectorparts; + stringtok(parts,i->content); + if (parts.size() >= 3) { + B.lookup(qtypes[n],parts[2],p); + } + else + continue; + } + else { + B.lookup(qtypes[n],i->content,p); + } bool foundOne=false; while(B.get(rr)) { foundOne=true; --DocE+STaALJfprDB-- From norbert@linuxnetworks.de Sun Oct 19 20:08:29 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id D353D181F6 for ; Sun, 19 Oct 2003 20:08:29 +0200 (CEST) Received: from notebook.linuxnetworks.de (B040a.b.pppool.de [213.7.4.10]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9JI8PfH008664; Sun, 19 Oct 2003 20:08:26 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sun, 19 Oct 2003 20:01:00 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_cFtk/M4xLvP8Ai8" Message-Id: <200310192001.06136.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] ldapbackend ipv6 fix X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2003 18:08:30 -0000 --Boundary-00=_cFtk/M4xLvP8Ai8 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Attached you find a diff which fixes ipv6 reverse lookups if=20 ldap-disable-ptrrecord is enabled. The new file utils.hh contains now=20 all ip transformation functions. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+S0WAACgkQxMLs5v5/7eAHNACeLsfinSbgQ4R5E1Y6kUs/WC9n Y+cAnA3eqdeClb9sxRSICPsw7V0zpoCh =3DF0hR =2D----END PGP SIGNATURE----- --Boundary-00=_cFtk/M4xLvP8Ai8 Content-Type: text/x-diff; charset="iso-8859-15"; name="ip6_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ip6_fix.diff" --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.cc Wed Oct 15 14:26:04 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.cc Wed Oct 15 22:32:27 2003 @@ -140,20 +140,20 @@ m_qname = qname; qesc = toLower( m_pldap->escape( qname ) ); - if( mustDo( "disable-ptrrecord" ) ) // PTRRecords will be derived from ARecords + if( mustDo( "disable-ptrrecord" ) ) // PTRRecords will be derived from aRecords or aAAARecords { stringtok( parts, qesc, "." ); len = qesc.length(); if( parts.size() == 6 && len > 13 && qesc.substr( len - 13, 13 ) == ".in-addr.arpa" ) // IPv4 reverse lookups { - filter = name2filter( parts, "aRecord", "." ); + filter = "(aRecord=" + ptr2ip4( parts ) + ")"; attronly[0] = "associatedDomain"; attributes = attronly; } - else if( parts.size() == 10 && len > 9 && ( qesc.substr( len - 8, 8 ) == ".ip6.int" ) ) // IPv6 reverse lookups + else if( parts.size() == 34 && len > 9 && ( qesc.substr( len - 9, 9 ) == ".ip6.arpa" ) ) // IPv6 reverse lookups { - filter = name2filter( parts, "aAAARecord", ":" ); + filter = "(aAAARecord=" + ptr2ip6( parts ) + ")"; attronly[0] = "associatedDomain"; attributes = attronly; } @@ -290,25 +290,6 @@ } return false; -} - - -inline string LdapBackend::name2filter( vector& parts, string record, string separator ) -{ - string filter; - parts.pop_back(); - parts.pop_back(); - - filter = "(" + record + "=" + parts.back(); - parts.pop_back(); - while( !parts.empty() ) - { - filter += separator + parts.back(); - parts.pop_back(); - } - filter += ")"; - - return filter; } --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.hh Sat Aug 30 13:31:07 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.hh Wed Oct 15 22:32:18 2003 @@ -23,10 +23,8 @@ #include #include #include -#include -#include -#include -#include +#include +#include #include #include #include @@ -36,12 +34,14 @@ #include #include #include "powerldap.hh" +#include "utils.hh" #ifndef LDAPBACKEND_HH #define LDAPBACKEND_HH -using namespace std; +using std::string; +using std::vector; @@ -83,7 +83,6 @@ vector m_adomains; bool prepareEntry(); - string name2filter( vector& parts, string record, string separator ); public: --Boundary-00=_cFtk/M4xLvP8Ai8 Content-Type: text/x-c++hdr; charset="iso-8859-15"; name="utils.hh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="utils.hh" #include #include #include #ifndef LDAPBACKEND_UTILS_HH #define LDAPBACKEND_UTILS_HH using std::string; using std::vector; inline string ptr2ip4( vector& parts ) { string ip; parts.pop_back(); parts.pop_back(); ip = parts.back(); parts.pop_back(); while( !parts.empty() ) { ip += "." + parts.back(); parts.pop_back(); } return ip; } inline string ptr2ip6( vector& parts ) { int i = 0; string ip; parts.pop_back(); parts.pop_back(); while( i < 3 && parts.size() > 1 ) { if( parts.back() != "0" ) { ip += parts.back(); } parts.pop_back(); i++; } ip += parts.back(); parts.pop_back(); while( !parts.empty() ) { i = 0; ip += ":"; while( i < 3 && parts.size() > 1 ) { if( parts.back() != "0" ) { ip += parts.back(); } parts.pop_back(); i++; } ip += parts.back(); parts.pop_back(); } return ip; } inline string ip2ptr4( string ip ) { string ptr; vector parts; stringtok( parts, ip, "." ); while( !parts.empty() ) { ptr += parts.back() + "."; parts.pop_back(); } return ptr + "in-addr.arpa"; } inline string ip2ptr6( string ip ) { string ptr, part, defstr; vector parts; stringtok( parts, ip, ":" ); while( !parts.empty() ) { defstr = "0.0.0.0."; part = parts.back(); while( part.length() < 4 ) { part = "0" + part; } defstr[0] = part[3]; defstr[2] = part[2]; defstr[4] = part[1]; defstr[6] = part[0]; ptr += defstr; parts.pop_back(); } return ptr + "ip6.arpa"; } #endif --Boundary-00=_cFtk/M4xLvP8Ai8-- From norbert@linuxnetworks.de Wed Oct 22 11:52:52 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id B0B0618275 for ; Wed, 22 Oct 2003 11:52:52 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9M9lkCC008976; Wed, 22 Oct 2003 11:47:46 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Wed, 22 Oct 2003 11:45:22 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_yGll/Guro4+uw8y" Message-Id: <200310221145.31457.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] Error in PowerLDAP::waitResult() X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2003 09:52:52 -0000 --Boundary-00=_yGll/Guro4+uw8y Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert There's an error in waitResult() in powerldap.cc, preventing proper=20 error handling. Diff is attached. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+WUboACgkQxMLs5v5/7eCEBQCeMc8MWZtPyALX/THOIWl+py36 G98An1Lf4fHMD2DwiZWa2uBYvA5ugyXK =3Dw9qd =2D----END PGP SIGNATURE----- --Boundary-00=_yGll/Guro4+uw8y Content-Type: text/x-diff; charset="iso-8859-15"; name="powerldap_waitresult.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="powerldap_waitresult.diff" --- pdns-2.9.11/modules/ldapbackend/powerldap.cc Sat Jul 5 14:29:41 2003 +++ pdns-2.9.12/modules/ldapbackend/powerldap.cc Wed Oct 22 11:38:13 2003 @@ -56,7 +56,7 @@ if(retresult) *retresult=result; - if(rc==LDAP_RES_SEARCH_ENTRY || LDAP_RES_SEARCH_RESULT) // no error in that case + if( rc==LDAP_RES_SEARCH_ENTRY || rc==LDAP_RES_SEARCH_RESULT ) // no error in that case return rc; int err; --Boundary-00=_yGll/Guro4+uw8y-- From norbert@linuxnetworks.de Wed Oct 22 15:04:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 7B7A31820F for ; Wed, 22 Oct 2003 15:04:53 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9MCxXDg000507; Wed, 22 Oct 2003 14:59:47 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Wed, 22 Oct 2003 14:54:41 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_R4nl/tO3NPpFlXH" Message-Id: <200310221454.45034.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] Include ns and mx in ldapbackend axfr X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2003 13:04:53 -0000 --Boundary-00=_R4nl/tO3NPpFlXH Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert This patch fixes the issue brought up by Marek that NS and MX records=20 are not included into AXFR if they are in the ldap entry as the SOA=20 record. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+WfhEACgkQxMLs5v5/7eCRcQCfWvOQ16FeFoX0nZr3TtufEc4B ElkAni21H4Ek0K7DwV5ZJ6X3ikWWyVGL =3Dmi53 =2D----END PGP SIGNATURE----- --Boundary-00=_R4nl/tO3NPpFlXH Content-Type: text/x-diff; charset="iso-8859-15"; name="axfr_nsmx.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="axfr_nsmx.diff" --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.cc Wed Oct 22 14:47:15 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.cc Wed Oct 22 14:46:02 2003 @@ -65,40 +65,18 @@ bool LdapBackend::list( const string &target, int domain_id ) { - string filter, dn; - char* attributes[] = { "associatedDomain", NULL }; + string filter; try { - // search for DN of SOA record which is SOA for target zone - - filter = "(&(associatedDomain=" + target + ")(SOARecord=*))"; - m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); - - if( m_pldap->getSearchEntry( m_msgid, m_result, true ) == false ) - { - L << Logger::Error << backendname << " Unable to get SOA record for " << target << endl; - return false; - } - - if( m_result.empty() || !m_result.count( "dn" ) || m_result["dn"].empty() ) - { - L << Logger::Error << backendname << " No SOA record for " << target << endl; - return false; - } - - dn = m_result["dn"].front(); - m_result.clear(); - - // list all records one level below but not entries containing SOA records (these are seperate zones) - - DLOG( L << Logger::Debug << backendname << " List = target: " << target << ", basedn: = " << dn << endl ); - - m_qname = ""; + m_qname = target; + m_axfrqlen = target.length(); m_adomain = m_adomains.end(); // skip loops in get() first time - filter = "(&(associatedDomain=*" + target + ")(!(SOARecord=*)))"; - m_msgid = m_pldap->search( dn, LDAP_SCOPE_ONELEVEL, filter, (const char**) attrany ); + + DLOG( L << Logger::Debug << backendname << " List = target: " << target << endl ); + filter = "(|(associatedDomain=" + target + ")(associatedDomain=*." + target + "))"; + m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attrany ); } catch( LDAPTimeout < ) { @@ -136,6 +114,7 @@ try { + m_axfrqlen = 0; m_qtype = qtype; m_qname = qname; qesc = toLower( m_pldap->escape( qname ) ); @@ -304,7 +283,7 @@ m_result.erase( "dNSTTL" ); } - if( !m_qname.empty() ) // request was a normal lookup() + if( !m_axfrqlen ) // request was a normal lookup() { m_adomains.push_back( m_qname ); if( m_result.count( "associatedDomain" ) ) @@ -317,7 +296,12 @@ { if( m_result.count( "associatedDomain" ) ) { - m_adomains = m_result["associatedDomain"]; + vector::iterator i; + for( i = m_result["associatedDomain"].begin(); i != m_result["associatedDomain"].end(); i++ ) { + if( i->substr( i->length() - m_axfrqlen, m_axfrqlen ) == m_qname ) { + m_adomains.push_back( *i ); + } + } m_result.erase( "associatedDomain" ); } } --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.hh Wed Oct 22 14:47:15 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.hh Wed Oct 22 13:59:57 2003 @@ -72,6 +72,7 @@ private: int m_msgid; + int m_axfrqlen; u_int32_t m_ttl; u_int32_t m_default_ttl; string m_qname; --Boundary-00=_R4nl/tO3NPpFlXH-- From norbert@linuxnetworks.de Thu Oct 23 12:13:15 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 8D8C6182BB; Thu, 23 Oct 2003 12:13:15 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9NADFC3027201; Thu, 23 Oct 2003 12:13:15 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: PDNS User Date: Thu, 23 Oct 2003 12:13:54 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310231213.56070.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] pdns on debian ppc / pdns and intel icc X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 10:13:16 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all Just for fun I've compiled and tested pdns + ldapbackend on a powerpc=20 machine running debian woody and it works flawlessly. Compiling pdns with intels icc compiler was not successfull at all. I=20 got thousands of warnings (gcc is very lax about C/C++ code) and it=20 bailed out somewhere in bindbackend. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+XqeIACgkQxMLs5v5/7eA6iwCglsLeGB2Zl7zWPXi+a4YMbFmj VWMAn0j1NeCHEKjEe200xqlELmKqEEVn =3DZZMN =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Thu Oct 23 13:07:48 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 6E6F41826C; Thu, 23 Oct 2003 13:07:48 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 70E5344CE; Thu, 23 Oct 2003 13:05:26 +0200 (CEST) Date: Thu, 23 Oct 2003 13:05:26 +0200 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] pdns on debian ppc / pdns and intel icc Message-ID: <20031023110526.GA8762@outpost.ds9a.nl> References: <200310231213.56070.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310231213.56070.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer cc: PDNS User X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 11:07:48 -0000 On Thu, Oct 23, 2003 at 12:13:54PM +0200, Norbert Sendetzky wrote: > Just for fun I've compiled and tested pdns + ldapbackend on a powerpc > machine running debian woody and it works flawlessly. Cool. > Compiling pdns with intels icc compiler was not successfull at all. I > got thousands of warnings (gcc is very lax about C/C++ code) and it > bailed out somewhere in bindbackend. gcc is not lax, icc is pretty uncompliant. gcc 3.3 is among the most complete and strict compilers out there. Thanks! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Thu Oct 23 13:32:00 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 4BD8918362 for ; Thu, 23 Oct 2003 13:32:00 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9NBVx9I015106; Thu, 23 Oct 2003 13:31:59 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] pdns on debian ppc / pdns and intel icc Date: Thu, 23 Oct 2003 13:32:33 +0200 User-Agent: KMail/1.5.4 References: <200310231213.56070.norbert@linuxnetworks.de> <20031023110526.GA8762@outpost.ds9a.nl> In-Reply-To: <20031023110526.GA8762@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310231332.35348.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 11:32:00 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 23 October 2003 13:05, you wrote: > > Compiling pdns with intels icc compiler was not successfull at > > all. I got thousands of warnings (gcc is very lax about C/C++ > > code) and it bailed out somewhere in bindbackend. > > gcc is not lax, icc is pretty uncompliant. gcc 3.3 is among the > most complete and strict compilers out there. Depends on the compliance to which standard. icc is compliant (I think=20 at least more than gcc) to ansi C/C++ and gcc is mostly complient to=20 ansi, but icc is not complient to most gcc extensions. If you see gcc=20 as standard, you are right. But icc is definitely more strict than gcc about what is allowed and=20 what is not. There are three or four types of warnings which icc=20 repeatedly prints out. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+XvFIACgkQxMLs5v5/7eBX0QCggO2Rx7ZONbABtgB7/vpODBXt bRIAoLI50RQr0hlo/QkG22HCtZsLwx28 =3DJ/lf =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Thu Oct 23 13:54:28 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 9B62B18365 for ; Thu, 23 Oct 2003 13:54:28 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9NBsRE4017118; Thu, 23 Oct 2003 13:54:27 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Thu, 23 Oct 2003 13:55:04 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310231355.05962.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] compiling pdns by icc X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 11:54:28 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I get an error in the return line (bindbackend2.hh): size_t operator()(const string& s) const { return __stl_hash_string(s.c_str()); } __stl_hash_string is not known by icc. Can it be replaced by something=20 which doesn't use internal things? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+XwZgACgkQxMLs5v5/7eAIUQCgqLo7SwJ+0GIHcmx+CZ/97Ut7 BpoAnjsx2vi7HyFyfS725WWyY5NmI2m0 =3DKYnU =2D----END PGP SIGNATURE----- From ahu@outpost.ds9a.nl Thu Oct 23 20:22:08 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id BEA9B183B9 for ; Thu, 23 Oct 2003 20:22:08 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id AB9DF3FC4; Thu, 23 Oct 2003 20:22:08 +0200 (CEST) Date: Thu, 23 Oct 2003 20:22:08 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20031023182208.GL19085@outpost.ds9a.nl> References: <200310221454.45034.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310221454.45034.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] Include ns and mx in ldapbackend axfr X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 18:22:08 -0000 On Wed, Oct 22, 2003 at 02:54:41PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > This patch fixes the issue brought up by Marek that NS and MX records > are not included into AXFR if they are in the ldap entry as the SOA > record. Applied, thanks. I don't understand what you mean however 'as the SOA record'? -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Thu Oct 23 20:38:40 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 23E33183B5 for ; Thu, 23 Oct 2003 20:38:40 +0200 (CEST) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 12A6E40FF; Thu, 23 Oct 2003 20:38:35 +0200 (CEST) Date: Thu, 23 Oct 2003 20:38:35 +0200 From: bert hubert To: Norbert Sendetzky Message-ID: <20031023183834.GA20381@outpost.ds9a.nl> References: <200310192001.06136.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310192001.06136.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] ldapbackend ipv6 fix X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 18:38:40 -0000 On Sun, Oct 19, 2003 at 08:01:00PM +0200, Norbert Sendetzky wrote: > Attached you find a diff which fixes ipv6 reverse lookups if > ldap-disable-ptrrecord is enabled. The new file utils.hh contains now > all ip transformation functions. Applied, thanks. Btw: + else if( parts.size() == 34 && len > 9 && (qesc.substr( len - 9, 9 ) == ".ip6.arpa" ) ) // IPv6 reverse lookups This looks pretty fragile! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Fri Oct 24 12:08:05 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id 0D3C11828E for ; Fri, 24 Oct 2003 12:08:05 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9OA83bt007369; Fri, 24 Oct 2003 12:08:04 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] compiling pdns by icc Date: Fri, 24 Oct 2003 12:08:18 +0200 User-Agent: KMail/1.5.4 References: <200310231355.05962.norbert@linuxnetworks.de> In-Reply-To: <200310231355.05962.norbert@linuxnetworks.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310241208.24741.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 10:08:05 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 23 October 2003 13:55, Norbert Sendetzky wrote: > __stl_hash_string is not known by icc. Can it be replaced by > something which doesn't use internal things? I've erased the following lines in pdns/backend/bind/bindbackend.hh,=20 pdns/backend/bind/bindbackend2.hh and pdns/packetcache.hh. =2D - struct compare_string =2D - { =2D - bool operator()(const string& s1, const string& s2) const =2D - { =2D - return s1 =3D=3D s2; =2D - } =2D - }; =2D -=20 =2D - struct hash_string =2D - { =2D - size_t operator()(const string& s) const =2D - { =2D - return __stl_hash_string(s.c_str()); =2D - } =2D - }; =46urthermore I've changed the line below in =20 pdns/backend/bind/bindbackend.hh and=20 pdns/backend/bind/bindbackend2.hh: =2D - typedef hash_map, hash_string,=20 compare_string> cmap_t; + typedef hash_map > cmap_t; and changed this line in packetcache.hh: =2D - typedef hash_map=20 cmap_t; + typedef hash_map cmap_t; In addition, I had to include in=20 pdns/backend/bind/bindbackend.hh and=20 pdns/backend/bind/bindbackend2.hh. Now it compiles by using intels icc, but I don't know if pdns works as=20 expected. Bert, can you tell me if my modifications have an impact on=20 the functionality? Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+Y+hYACgkQxMLs5v5/7eCjkQCgnnWR7HHFs+YD3fCOOg3DQV69 1+MAn1jYnTw6ebl58Wirzvt4YJ6/VioO =3DSYqn =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Fri Oct 24 15:26:59 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 0BE0018137 for ; Fri, 24 Oct 2003 15:26:59 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9ODLq1C007233; Fri, 24 Oct 2003 15:21:53 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] compiling pdns by icc Date: Fri, 24 Oct 2003 15:22:26 +0200 User-Agent: KMail/1.5.4 References: <200310231355.05962.norbert@linuxnetworks.de> <200310241208.24741.norbert@linuxnetworks.de> In-Reply-To: <200310241208.24741.norbert@linuxnetworks.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310241522.27709.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 13:26:59 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 24 October 2003 12:08, Norbert Sendetzky wrote: > Furthermore I've changed the line below in > pdns/backend/bind/bindbackend.hh and > pdns/backend/bind/bindbackend2.hh: > > - typedef hash_map, hash_string, > compare_string> cmap_t; > + typedef hash_map > cmap_t; I finally changed it to typedef map > cmap_t; > and changed this line in packetcache.hh: > > - typedef hash_map > cmap_t; > + typedef hash_map cmap_t; and this to typedef map cmap_t; I additionally had to compile a static version=20 (LDFLAGS=3D-static-libcxa), because after compiling there was no=20 ldapbackend.so.0.0.0 in modules/ldapbackend/.libs/, but finally I got=20 a working pdns_server :-) Well at least the bind-example-zones and the ldapbackend are working=20 correctly and I havn't done further tests. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+ZJ5IACgkQxMLs5v5/7eAJBQCeIiV8W5v3Ts1AKKlWKntf+k/N A7MAoJBW6VB8r10Dv/iBKk3VWlOEPD/w =3Dh37I =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Fri Oct 24 15:41:21 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 3518018099 for ; Fri, 24 Oct 2003 15:41:21 +0200 (CEST) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9ODfKXA007269; Fri, 24 Oct 2003 15:41:20 +0200 (MEST) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] compiling pdns by icc Date: Fri, 24 Oct 2003 15:41:53 +0200 User-Agent: KMail/1.5.4 References: <200310231355.05962.norbert@linuxnetworks.de> <200310241208.24741.norbert@linuxnetworks.de> In-Reply-To: <200310241208.24741.norbert@linuxnetworks.de> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_hwSm/2eKiQzBzxO" Message-Id: <200310241541.54950.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2003 13:41:21 -0000 --Boundary-00=_hwSm/2eKiQzBzxO Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert Here is the complete diff of all my fixes for compilation with icc.=20 Could you please check them for introduced errors? Thanks Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+ZLCEACgkQxMLs5v5/7eAytACgt68j2nzAK4v6qvLx9QT6xloL wqsAnRMIBUGh5MNTXQAE6cnGi0XQyLKC =3DBdim =2D----END PGP SIGNATURE----- --Boundary-00=_hwSm/2eKiQzBzxO Content-Type: text/x-diff; charset="iso-8859-15"; name="pdns_icc_fixes.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pdns_icc_fixes.diff" --- pdns-2.9.12/pdns/backends/bind/bindbackend.cc 2003-08-23 16:35:35.000000000 +0200 +++ pdns-2.9.12-icc/pdns/backends/bind/bindbackend.cc 2003-10-24 12:24:37.000000000 +0200 @@ -608,7 +608,7 @@ *status=msg.str(); L< #include #include +#include #include "huffman.hh" -#if __GNUC__ >= 3 -# include -using namespace __gnu_cxx; -#else -# include -#endif - using namespace std; @@ -104,24 +98,7 @@ }; -struct compare_string -{ - bool operator()(const string& s1, const string& s2) const - { - return s1 == s2; - } -}; - -struct hash_string -{ - size_t operator()(const string& s) const - { - return __stl_hash_string(s.c_str()); - } -}; - -typedef hash_map, hash_string, compare_string> cmap_t; - +typedef map > cmap_t; /** The Bind2Backend is a DNSBackend that can answer DNS related questions. It looks up data --- pdns-2.9.12/pdns/backends/bind/bindbackend.hh 2003-08-23 16:35:35.000000000 +0200 +++ pdns-2.9.12-icc/pdns/backends/bind/bindbackend.hh 2003-10-24 15:30:18.000000000 +0200 @@ -22,16 +22,10 @@ #include #include #include +#include #include "huffman.hh" -#if __GNUC__ >= 3 -# include -using namespace __gnu_cxx; -#else -# include -#endif - using namespace std; @@ -103,24 +97,7 @@ }; -struct compare_string -{ - bool operator()(const string& s1, const string& s2) const - { - return s1 == s2; - } -}; - -struct hash_string -{ - size_t operator()(const string& s) const - { - return __stl_hash_string(s.c_str()); - } -}; - -typedef hash_map, hash_string, compare_string> cmap_t; - +typedef map > cmap_t; /** The BindBackend is a DNSBackend that can answer DNS related questions. It looks up data --- pdns-2.9.12/pdns/packetcache.hh 2002-11-27 16:18:32.000000000 +0100 +++ pdns-2.9.12-icc/pdns/packetcache.hh 2003-10-24 15:33:29.000000000 +0200 @@ -23,18 +23,6 @@ #include #include -#ifndef WIN32 -# if __GNUC__ >= 3 -# include -using namespace __gnu_cxx; -# else -# include -# endif // __GNUC__ - -#else -# include - -#endif // WIN32 using namespace std; @@ -84,31 +72,9 @@ typedef CacheContent cvalue_t; void getTTLS(); -#ifndef WIN32 - - struct compare_string - { - bool operator()(const string& s1, const string& s2) const - { - return s1 == s2; - } - }; - struct hash_string - { - size_t operator()(const string& s) const - { - return __stl_hash_string(s.c_str()); - } - }; - - typedef hash_map cmap_t; - -#else typedef map< ckey_t, cvalue_t > cmap_t; -#endif // WIN32 - cmap_t d_map; pthread_rwlock_t d_mut; --Boundary-00=_hwSm/2eKiQzBzxO-- From norbert@linuxnetworks.de Sun Oct 26 18:30:54 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id A3DF8180E2 for ; Sun, 26 Oct 2003 18:30:54 +0100 (CET) Received: from notebook.linuxnetworks.de (B0469.b.pppool.de [213.7.4.105]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9QHPeOw024236; Sun, 26 Oct 2003 18:25:40 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sun, 26 Oct 2003 18:24:33 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_SNAn/iRoxxBtEhO" Message-Id: <200310261824.50021.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] expected behaviour of loglevel X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2003 17:30:54 -0000 --Boundary-00=_SNAn/iRoxxBtEhO Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I've attached a patch, which changes the behaviour of the argument=20 "loglevel" to the behaviour everybody is expecting after reading the=20 description in pdns.conf. The previous behaviour was to log messages to the console if the=20 urgency of the message was higher than the loglevel. This might be=20 slightly useful for developers testing modifications on the local=20 machine, but neither help users nor developers to find errors in a=20 productive environment. Now only messages with an urgency higher than "loglevel" are written=20 to the syslog. Thus the user can decide how much messages should be=20 logged and the amount can be increased dynamically for debugging=20 purpose. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+cA1YACgkQxMLs5v5/7eBDygCbB9jtqOcNfPD0mwj01X7qfv+t JksAoLiCjqLI7KanCRteokaIGhcSyEhs =3DfvDi =2D----END PGP SIGNATURE----- --Boundary-00=_SNAn/iRoxxBtEhO Content-Type: text/x-diff; charset="iso-8859-15"; name="loglevel.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="loglevel.diff" --- pdns-2.9.12.orig/pdns/logger.hh Wed Nov 27 16:18:32 2002 +++ pdns-2.9.12/pdns/logger.hh Sun Oct 26 17:33:35 2003 @@ -94,7 +94,7 @@ void setName(const string &); //! set lower limit of urgency needed for console display. Messages of this urgency, and higher, will be displayed - void toConsole(Urgency); + void setLoglevel(Urgency); //! Log to a file. void toFile( const string & filename ); @@ -126,7 +126,7 @@ int flags; int d_facility; bool opened; - Urgency consoleUrgency; + Urgency loglevel; pthread_mutex_t lock; }; --- pdns-2.9.12.orig/pdns/logger.cc Sun Sep 28 19:37:19 2003 +++ pdns-2.9.12/pdns/logger.cc Sun Oct 26 17:39:26 2003 @@ -31,26 +31,17 @@ void Logger::log(const string &msg, Urgency u) { - struct tm tm; - time_t t; - time(&t); - tm=*localtime(&t); - - if(u<=consoleUrgency) {// Sep 14 06:52:09 - char buffer[50]; - strftime(buffer,sizeof(buffer),"%b %d %H:%M:%S ", &tm); - clog< Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (outpost.ds9a.nl [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id C5DC218244 for ; Mon, 27 Oct 2003 15:16:08 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 8C7873F8F; Mon, 27 Oct 2003 15:16:08 +0100 (CET) Date: Mon, 27 Oct 2003 15:16:08 +0100 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] compiling pdns by icc Message-ID: <20031027141608.GA3334@outpost.ds9a.nl> References: <200310231355.05962.norbert@linuxnetworks.de> <200310241208.24741.norbert@linuxnetworks.de> <200310241522.27709.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310241522.27709.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 14:16:08 -0000 On Fri, Oct 24, 2003 at 03:22:26PM +0200, Norbert Sendetzky wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Friday 24 October 2003 12:08, Norbert Sendetzky wrote: > > Furthermore I've changed the line below in > > pdns/backend/bind/bindbackend.hh and > > pdns/backend/bind/bindbackend2.hh: > > > > - typedef hash_map, hash_string, > > compare_string> cmap_t; > > + typedef hash_map > cmap_t; > > I finally changed it to > typedef map > cmap_t; Which is not good for the gcc users. A better way is to hook into the logic for Visual C++ which also has no hash_map. Or figure out what the hash_map of icc is called. Thanks for the effort though! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Mon Oct 27 15:50:33 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 6CA7B18279 for ; Mon, 27 Oct 2003 15:50:33 +0100 (CET) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9REjRML029725; Mon, 27 Oct 2003 15:45:27 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Subject: Re: [Pdns-dev] compiling pdns by icc Date: Mon, 27 Oct 2003 15:45:42 +0100 User-Agent: KMail/1.5.4 References: <200310231355.05962.norbert@linuxnetworks.de> <200310241522.27709.norbert@linuxnetworks.de> <20031027141608.GA3334@outpost.ds9a.nl> In-Reply-To: <20031027141608.GA3334@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310271545.44349.norbert@linuxnetworks.de> cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 14:50:33 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 27 October 2003 15:16, bert hubert wrote: > > I finally changed it to > > typedef map > cmap_t; > > Which is not good for the gcc users. A better way is to hook into > the logic for Visual C++ which also has no hash_map. Or figure out > what the hash_map of icc is called. icc knows hash_map. The problem is that __stl_hash_string isn't known,=20 because it's an internal thing of gcc. Does hash_map without=20 hash_string and compare_string work correctly? =3D> typedef hash_map > cmap_t; Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+dL5cACgkQxMLs5v5/7eBj4ACgqhE2/fGGvqmECrgyCIfLibV5 aNEAniXZpkEJXQxUCEuTnRv1o+tbtTff =3DeM0y =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Mon Oct 27 16:14:14 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp01.rzone.de (natsmtp01.rzone.de [81.169.145.166]) by spoon.powerdns.com (Postfix) with ESMTP id EC2891801F for ; Mon, 27 Oct 2003 16:14:13 +0100 (CET) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9RFE9fH001936; Mon, 27 Oct 2003 16:14:10 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Mon, 27 Oct 2003 16:14:25 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310271614.26858.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] autoconf misses ldap.h check X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 15:14:14 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert The configure script doesn't check if the ldap headers (especially=20 ldap.h) are installed. Thus, the lack of these headers isn't noticed=20 until compilation fails. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+dNlEACgkQxMLs5v5/7eCZVwCgjJQcakFFYOLxWg5b2KMewrqB OgcAnAy7zh2Y1hpfJDQjFvTc8a748uaF =3DloS8 =2D----END PGP SIGNATURE----- From norbert@linuxnetworks.de Fri Oct 31 13:44:52 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 283C7183B0 for ; Fri, 31 Oct 2003 13:44:52 +0100 (CET) Received: from stream.codingtechnologies.de (stream.codingtechnologies.de [62.128.12.25]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id h9VCdfYt011842; Fri, 31 Oct 2003 13:39:43 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Fri, 31 Oct 2003 13:39:36 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Iglo/EoRnul3LXe" Message-Id: <200310311339.43466.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] ldapbackend srv records and log improvement X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2003 12:44:52 -0000 --Boundary-00=_Iglo/EoRnul3LXe Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert This patch enables SRV records in the ldapbackend (thanks to Matt=20 Dainty for providing initial code), fixes a DoS attack vulnerability=20 if MX records doesn't contain the priority and reenables all logging. Please DO NOT apply this patch before applying my loglevel patch.=20 Otherwise the logs of even semi active sites get trashed with all=20 sorts of log messages. Thanks Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+iWA0ACgkQxMLs5v5/7eAXagCaAveVfK4EAiUppakBdPIOgPYw qY0AnArqydGdUb7CAg0RLkEpG85eX+Jn =3DpzFT =2D----END PGP SIGNATURE----- --Boundary-00=_Iglo/EoRnul3LXe Content-Type: text/x-diff; charset="iso-8859-15"; name="ldap_srv_dos_log.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldap_srv_dos_log.diff" --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.hh Thu Oct 23 20:36:19 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.hh Thu Oct 30 10:38:13 2003 @@ -53,14 +53,21 @@ "aRecord", "nSRecord", "cNAMERecord", + "sOARecord", "pTRRecord", + "hInfoRecord", "mXRecord", "tXTRecord", "rPRecord", +// "SigRecord", +// "KeyRecord", "aAAARecord", "lOCRecord", +// "nXTRecord", + "sRVRecord", "nAPTRRecord", - "aXFRRecord", +// "kXRecord", +// "certRecord", NULL }; --- pdns-2.9.12.orig/modules/ldapbackend/ldapbackend.cc Thu Oct 23 20:36:19 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.cc Thu Oct 30 10:33:13 2003 @@ -52,7 +52,7 @@ throw( AhuException( "Unable to bind to ldap server" ) ); } - L << Logger::Info << backendname << " Ldap connection succeeded" << endl; + L << Logger::Notice << backendname << " Ldap connection succeeded" << endl; } @@ -74,13 +74,14 @@ m_axfrqlen = target.length(); m_adomain = m_adomains.end(); // skip loops in get() first time - DLOG( L << Logger::Debug << backendname << " List = target: " << target << endl ); + L << Logger::Info << backendname << " List = target: " << target << endl; + filter = "(|(associatedDomain=" + target + ")(associatedDomain=*." + target + "))"; m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attrany ); } catch( LDAPTimeout < ) { - L << Logger::Error << backendname << " Unable to get zone " + target + " from LDAP directory: " << lt.what() << endl; + L << Logger::Warning << backendname << " Unable to get zone " + target + " from LDAP directory: " << lt.what() << endl; return false; } catch( LDAPException &le ) @@ -90,12 +91,12 @@ } catch( exception &e ) { - L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; + L << Logger::Error << backendname << " Caught STL exception for target " << target << ": " << e.what() << endl; return false; } catch( ... ) { - L << Logger::Critical << backendname << " Caught unknown exception" << endl; + L << Logger::Critical << backendname << " Caught unknown exception for target " << target << endl; return false; } @@ -160,14 +161,14 @@ } } - DLOG( L << Logger::Debug << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + L << Logger::Debug << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_adomain = m_adomains.end(); // skip loops in get() first time m_msgid = m_pldap->search( getArg("basedn"), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); } catch( LDAPTimeout < ) { - L << Logger::Error << backendname << " Unable to search LDAP directory: " << lt.what() << endl; + L << Logger::Warning << backendname << " Unable to search LDAP directory: " << lt.what() << endl; return; } catch( LDAPException &le ) @@ -177,12 +178,12 @@ } catch( exception &e ) { - L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; + L << Logger::Error << backendname << " Caught STL exception for qname " << qname << ": " << e.what() << endl; return; } catch( ... ) { - L << Logger::Error << backendname << " Caught unknown exception" << endl; + L << Logger::Critical << backendname << " Caught unknown exception for qname " << qname << endl; return; } } @@ -216,25 +217,33 @@ rr.priority = 0; rr.ttl = m_ttl; - if( qt.getCode() == QType::MX ) // MX Record, e.g. 10 smtp.example.com + if( qt.getCode() == QType::MX || qt.getCode() == QType::SRV ) // Priority, e.g. 10 smtp.example.com { - parts.clear(); - stringtok( parts, content, " " ); + char* endptr; + string::size_type first = content.find_first_of( " " ); + + if( first == string::npos ) + { + L << Logger::Warning << backendname << " Invalid " << attrname << " without priority for " << m_qname << ": " << content << endl; + m_value++; + continue; + } - if( parts.size() != 2) + rr.priority = (u_int16_t) strtoul( (content.substr( 0, first )).c_str(), &endptr, 10 ); + if( *endptr != '\0' ) { - L << Logger::Warning << backendname << " Invalid MX record without priority: " << content << endl; + L << Logger::Warning << backendname << " Invalid " << attrname << " without priority for " << m_qname << ": " << content << endl; + m_value++; continue; } - rr.priority = (u_int16_t) strtol( parts[0].c_str(), NULL, 10 ); - content = parts[1]; + content = content.substr( first + 1, content.length() - first - 1 ); } rr.content = content; m_value++; - DLOG( L << Logger::Debug << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", content: " << rr.content << endl ); + L << Logger::Debug << backendname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", priority: " << rr.priority << ", ttl: " << rr.ttl << ", content: " << rr.content << endl; return true; } @@ -252,7 +261,7 @@ } catch( LDAPTimeout < ) { - L << Logger::Error << backendname << " Search failed: " << lt.what() << endl; + L << Logger::Warning << backendname << " Search failed: " << lt.what() << endl; } catch( LDAPException &le ) { @@ -261,11 +270,11 @@ } catch( exception &e ) { - L << Logger::Error << backendname << " Caught STL exception: " << e.what() << endl; + L << Logger::Error << backendname << " Caught STL exception for attribute " << attrname << ": " << e.what() << endl; } catch( ... ) { - L << Logger::Error << backendname << " Caught unknown exception" << endl; + L << Logger::Critical << backendname << " Caught unknown exception for attribute " << attrname << endl; } return false; --Boundary-00=_Iglo/EoRnul3LXe-- From norbert@linuxnetworks.de Fri Nov 7 18:17:19 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 856C51846B for ; Fri, 7 Nov 2003 18:17:19 +0100 (CET) Received: from notebook.linuxnetworks.de (B00f2.b.pppool.de [213.7.0.242]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id hA7HH8Nu013018; Fri, 7 Nov 2003 18:17:09 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Fri, 7 Nov 2003 17:28:44 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Message-Id: <200311071728.11605.norbert@linuxnetworks.de> Content-Type: Multipart/Mixed; boundary="Boundary-00=_8g8q/I/GQa5n8ok" cc: PDNS Developer Subject: [Pdns-dev] [patch] PowerLDAP cleanup and new features X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2003 17:17:19 -0000 --Boundary-00=_8g8q/I/GQa5n8ok Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert I've done a major cleanup in the PowerLDAP class and added two new features: New: - - {get,set}Option() for changing ldap behaviour - - Support for encrypted connections (TLS). Thanks to Matt Dainty for providing the code Both changes are backward compatible (source code level). Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+ryDwACgkQxMLs5v5/7eC0sQCdG7SzzQXvAvHxIQ7fPkyZ55zo 14MAn2Jre9ZR5B/NXXpCqdd0yayfw4SZ =vZ5B -----END PGP SIGNATURE----- --Boundary-00=_8g8q/I/GQa5n8ok Content-Type: text/x-diff; charset="iso-8859-15"; name="powerldap.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="powerldap.diff" --- pdns-2.9.12.orig/modules/ldapbackend/powerldap.hh Sat Aug 23 16:35:35 2003 +++ pdns-2.9.12/modules/ldapbackend/powerldap.hh Fri Nov 7 17:03:08 2003 @@ -1,52 +1,65 @@ -#ifndef POWERLDAP_HH -#define POWERLDAP_HH #include +#include #include #include #include -#include #include #include -using namespace std; + +#ifndef POWERLDAP_HH +#define POWERLDAP_HH + +using std::map; +using std::string; +using std::vector; + extern int errno; -class LDAPException : public runtime_error + +class LDAPException : public std::runtime_error { public: - explicit LDAPException(const string &str) : runtime_error(str){} + explicit LDAPException( const string &str ) : std::runtime_error( str ) {} }; + class LDAPTimeout : public LDAPException { public: - explicit LDAPTimeout() : LDAPException("Timeout"){} + explicit LDAPTimeout() : LDAPException( "Timeout" ) {} }; + class PowerLDAP { + LDAP* d_ld; + int d_timeout; + LDAPMessage* d_searchresult; + LDAPMessage* d_searchentry; + + const string getError( int rc = -1 ); + int waitResult( int msgid = LDAP_RES_ANY, LDAPMessage** retresult = 0 ); + public: - typedef map > sentry_t; - typedef vector sresult_t; + typedef map > sentry_t; + typedef vector sresult_t; + + PowerLDAP( const string& host = "127.0.0.1", u_int16_t port = LDAP_PORT, bool tls = false ); + ~PowerLDAP(); + + void getOption( int option, int* value ); + void setOption( int option, int value ); + + void simpleBind( const string& ldapbinddn = "", const string& ldapsecret = "" ); + int search( const string& base, int scope, const string& filter, const char** attr = 0 ); + + bool getSearchEntry( int msgid, sentry_t& entry, bool withdn = false ); + void getSearchResults( int msgid, sresult_t& result, bool withdn = false ); - PowerLDAP(const string &host="127.0.0.1", u_int16_t port=389); - void simpleBind(const string &ldapbinddn="", const string& ldapsecret=""); - int search(const string& base, int scope, const string& filter, const char **attr=0); - bool getSearchEntry(int msgid, sentry_t &entry, bool withdn=false); - void getSearchResults(int msgid, sresult_t &result, bool withdn=false); - ~PowerLDAP(); - static const string escape(const string &tobe); -private: - int waitResult(int msgid=LDAP_RES_ANY,LDAPMessage **retresult=0) ; - const string getError(int rc=-1); - LDAP *d_ld; - string d_host; - u_int16_t d_port; - int d_timeout; - LDAPMessage *d_searchresult; - LDAPMessage *d_searchentry; + static const string escape( const string& tobe ); }; #endif --- pdns-2.9.12.orig/modules/ldapbackend/powerldap.cc Sat Aug 23 16:35:35 2003 +++ pdns-2.9.12/modules/ldapbackend/powerldap.cc Fri Nov 7 17:19:00 2003 @@ -1,19 +1,12 @@ #include "powerldap.hh" -#include -#include -#include -#include -#include -#include - -PowerLDAP::PowerLDAP( const string &host, u_int16_t port ) : d_host( host ), d_port( port ), d_timeout( 5 ) +PowerLDAP::PowerLDAP( const string& host, u_int16_t port, bool tls ) : d_timeout( 5 ) { int protocol = LDAP_VERSION3; - if( ( d_ld = ldap_init( d_host.c_str(), d_port ) ) == NULL ) + if( ( d_ld = ldap_init( host.c_str(), port ) ) == NULL ) { throw LDAPException( "Error initializing LDAP connection: " + string( strerror( errno ) ) ); } @@ -23,30 +16,63 @@ protocol = LDAP_VERSION2; if( ldap_set_option( d_ld, LDAP_OPT_PROTOCOL_VERSION, &protocol ) != LDAP_OPT_SUCCESS ) { - throw LDAPException( "Couldn't set protocol version neiher to LDAPv3 nor to LDAPv2" ); + ldap_unbind( d_ld ); + throw LDAPException( "Couldn't set protocol version to LDAPv3 or LDAPv2" ); } } + + if( tls && ldap_start_tls_s( d_ld, NULL, NULL ) != LDAP_SUCCESS ) + { + ldap_unbind( d_ld ); + throw( LDAPException( "Couldn't perform STARTTLS" ) ); + } } -void PowerLDAP::simpleBind(const string &ldapbinddn, const string& ldapsecret) +PowerLDAP::~PowerLDAP() { - int err; - if( ( err = ldap_simple_bind_s( d_ld, ldapbinddn.c_str(), ldapsecret.c_str() ) ) != LDAP_SUCCESS ) { - throw LDAPException( "Failed to bind to LDAP server: " + getError( err ) ); - } + ldap_unbind( d_ld ); +} + + +void PowerLDAP::setOption( int option, int value ) +{ + if( ldap_set_option( d_ld, option, (void*) &value ) != LDAP_OPT_SUCCESS ) + { + throw( LDAPException( "Unable to set option" ) ); + } +} + + +void PowerLDAP::getOption( int option, int *value ) +{ + if( ldap_get_option( d_ld, option, (void*) value ) != LDAP_OPT_SUCCESS ) + { + throw( LDAPException( "Unable to get option" ) ); + } } + +void PowerLDAP::simpleBind( const string& ldapbinddn, const string& ldapsecret ) +{ + int err; + if( ( err = ldap_simple_bind_s( d_ld, ldapbinddn.c_str(), ldapsecret.c_str() ) ) != LDAP_SUCCESS ) + { + throw LDAPException( "Failed to bind to LDAP server: " + getError( err ) ); + } +} + + /** Function waits for a result, returns its type and optionally stores the result in retresult. If returned via retresult, the caller is responsible for freeing it with ldap_msgfree! */ -int PowerLDAP::waitResult(int msgid,LDAPMessage **retresult) +int PowerLDAP::waitResult(int msgid,LDAPMessage **retresult) { struct timeval tv; tv.tv_sec=d_timeout; tv.tv_usec=0; LDAPMessage *result; - + int rc=ldap_result(d_ld,msgid,0,&tv,&result); if(rc==-1) throw LDAPException("Error waiting for LDAP result: "+getError()); @@ -136,19 +162,20 @@ result.push_back(entry); } -PowerLDAP::~PowerLDAP() -{ - ldap_unbind( d_ld ); -} -const string PowerLDAP::getError(int rc) +const string PowerLDAP::getError( int rc ) { - int ld_errno=rc; - if(ld_errno==-1) - ldap_get_option(d_ld, LDAP_OPT_ERROR_NUMBER, &ld_errno); - return ldap_err2string(ld_errno); + int ld_errno = rc; + + if( ld_errno == -1 ) + { + getOption( LDAP_OPT_ERROR_NUMBER, &ld_errno ); + } + + return ldap_err2string( ld_errno ); } + const string PowerLDAP::escape(const string &name) { string a; @@ -160,50 +187,3 @@ } return a; } - - -#ifdef TESTDRIVER -int main(int argc, char **argv) -{ - int msgid, k, n; - - try - { - for(int k=0;k<30;++k) - { - PowerLDAP ldap; -// ldap.simpleBind("uid=ahu,ou=people,dc=snapcount","wuhwuh"); // anon - ldap.simpleBind("",""); // anon - - for(int n=0;n<30;n++) - { - PowerLDAP::sresult_t ret; - const char *attr[]={"uid","userPassword",0}; - -// msgid = ldap.search("ou=people,dc=snapcount","uid=ahu",attr); - msgid = ldap.search("o=linuxnetworks,c=de","objectclass=*",0); - - ldap.getSearchResults(msgid, ret); -// cout<begin();i!=h->end();++i) - { -// cout<<"attr: "<first<::const_iterator j=i->second.begin();j!=i->second.end();++j) - { -// cout<<"\t"<<*j< Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (unknown [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id CFB2118468 for ; Sat, 8 Nov 2003 13:11:02 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 9E8963FC1; Sat, 8 Nov 2003 13:11:02 +0100 (CET) Date: Sat, 8 Nov 2003 13:11:02 +0100 From: bert hubert To: Norbert Sendetzky Message-ID: <20031108121102.GA22341@outpost.ds9a.nl> References: <200311071728.11605.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311071728.11605.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] PowerLDAP cleanup and new features X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 12:11:03 -0000 On Fri, Nov 07, 2003 at 05:28:44PM +0100, Norbert Sendetzky wrote: > I've done a major cleanup in the PowerLDAP class and added two new > features: Applied, thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Nov 8 13:15:39 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (unknown [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id 2880C18457 for ; Sat, 8 Nov 2003 13:15:39 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id 057893FC4; Sat, 8 Nov 2003 13:15:39 +0100 (CET) Date: Sat, 8 Nov 2003 13:15:39 +0100 From: bert hubert To: Norbert Sendetzky Message-ID: <20031108121538.GB22341@outpost.ds9a.nl> References: <200310261824.50021.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310261824.50021.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer Subject: [Pdns-dev] Re: [patch] expected behaviour of loglevel X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 12:15:39 -0000 On Sun, Oct 26, 2003 at 06:24:33PM +0100, Norbert Sendetzky wrote: Content-Description: clearsigned data > The previous behaviour was to log messages to the console if the > urgency of the message was higher than the loglevel. This might be > slightly useful for developers testing modifications on the local > machine, but neither help users nor developers to find errors in a > productive environment. Sorry - this is much used by people with 'pdns monitor' to see what is happening on the foreground. I can't apply this patch because it removes all logging to the console, which a lot of people really need. What we need is two flags, one which says which messages go to the console and one which says which go to syslog. In your second patch, you log a lot which is not being written out because it is filtered, but be aware that logging is very expensive, even when not writing it out tot syslog! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From ahu@outpost.ds9a.nl Sat Nov 8 13:18:13 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from outpost.ds9a.nl (unknown [213.244.168.210]) by spoon.powerdns.com (Postfix) with ESMTP id EA60218457 for ; Sat, 8 Nov 2003 13:18:13 +0100 (CET) Received: by outpost.ds9a.nl (Postfix, from userid 1000) id DA4593FC4; Sat, 8 Nov 2003 13:18:13 +0100 (CET) Date: Sat, 8 Nov 2003 13:18:13 +0100 From: bert hubert To: Norbert Sendetzky Subject: Re: [Pdns-dev] compiling pdns by icc Message-ID: <20031108121813.GC22341@outpost.ds9a.nl> References: <200310231355.05962.norbert@linuxnetworks.de> <200310241208.24741.norbert@linuxnetworks.de> <200310241541.54950.norbert@linuxnetworks.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310241541.54950.norbert@linuxnetworks.de> User-Agent: Mutt/1.3.28i cc: PDNS Developer X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 12:18:14 -0000 On Fri, Oct 24, 2003 at 03:41:53PM +0200, Norbert Sendetzky wrote: Content-Description: clearsigned data > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Bert > > Here is the complete diff of all my fixes for compilation with icc. > Could you please check them for introduced errors? The error is that we moved all architectures from a hash to a tree-based container for the packetcache, which is not what I want, especially since it penalizes all gcc users (ie, me) for the few icc users! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From norbert@linuxnetworks.de Sat Nov 8 15:09:49 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id 8279D1870B for ; Sat, 8 Nov 2003 15:09:49 +0100 (CET) Received: from notebook.linuxnetworks.de (B0171.b.pppool.de [213.7.1.113]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id hA8E9kML019973; Sat, 8 Nov 2003 15:09:47 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 8 Nov 2003 15:07:27 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fiPr/R0hPMe24Y4" Message-Id: <200311081507.29759.norbert@linuxnetworks.de> cc: PDNS Developer Subject: [Pdns-dev] [patch] ldapbackend update X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 14:09:49 -0000 --Boundary-00=_fiPr/R0hPMe24Y4 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert This diff contains support for TLS (provided by Matt Dainty), fixes a=20 segfault (incorrect delete) and adds support for ldap references. It=20 requires the ldap_srv_dos_log.diff patch to be applied first. Norbert =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+s+J8ACgkQxMLs5v5/7eBseQCeJjnnsyM9J3QMDzsNnRJe2yte eeYAnA8kaYD9iTOdoDw8ymKz2j7MaoEs =3DVO7g =2D----END PGP SIGNATURE----- --Boundary-00=_fiPr/R0hPMe24Y4 Content-Type: text/x-diff; charset="iso-8859-15"; name="ldapbackend_tls.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ldapbackend_tls.diff" --- pdns-2.9.12.last/modules/ldapbackend/ldapbackend.cc Sat Nov 8 14:18:40 2003 +++ pdns-2.9.12/modules/ldapbackend/ldapbackend.cc Fri Nov 7 16:44:56 2003 @@ -32,24 +32,26 @@ m_msgid = 0; m_qname = ""; m_default_ttl = arg().asNum( "default-ttl" ); + m_pldap = NULL; - try + for( i = 0; i < hosts.length(); i++ ) { - for( i = 0; i < hosts.length(); i++ ) - { - if( hosts[i] == ',' ) { hosts[i] = ' '; } - } + if( hosts[i] == ',' ) { hosts[i] = ' '; } + } - L << Logger::Info << backendname << " LDAP servers = " << hosts << endl; + L << Logger::Info << backendname << " LDAP servers = " << hosts << endl; - m_pldap = new PowerLDAP( hosts.c_str(), atoi( getArg( "port" ).c_str() ) ); + try + { + m_pldap = new PowerLDAP( hosts.c_str(), atoi( getArg( "port" ).c_str() ), mustDo( "starttls" ) ); + m_pldap->setOption( LDAP_OPT_DEREF, LDAP_DEREF_ALWAYS ); m_pldap->simpleBind( getArg( "binddn" ), getArg( "secret" ) ); } catch( LDAPException &e ) { - delete( m_pldap ); - L << Logger::Error << backendname << " Ldap connection failed: " << e.what() << endl; - throw( AhuException( "Unable to bind to ldap server" ) ); + L << Logger::Error << backendname << " Initialization failed: " << e.what() << endl; + if( m_pldap != NULL ) { delete( m_pldap ); } + throw( AhuException( "Unable to connect to ldap server" ) ); } L << Logger::Notice << backendname << " Ldap connection succeeded" << endl; @@ -334,6 +336,7 @@ { declare( suffix, "host", "one or more ldap server","localhost:389" ); declare( suffix, "port", "ldap server port (depricated, use ldap-host)","389" ); + declare( suffix, "starttls", "use STARTTLS to encrypt connection", "no" ); declare( suffix, "basedn", "search root in ldap tree (must be set)","" ); declare( suffix, "binddn", "user dn for non anonymous binds","" ); declare( suffix, "secret", "user password for non anonymous binds", "" ); --Boundary-00=_fiPr/R0hPMe24Y4-- From norbert@linuxnetworks.de Sat Nov 8 15:09:53 2003 Return-Path: Delivered-To: pdns-dev@mailman.powerdns.com Received: from natsmtp00.webmailer.de (natsmtp00.rzone.de [81.169.145.165]) by spoon.powerdns.com (Postfix) with ESMTP id DA8041870B for ; Sat, 8 Nov 2003 15:09:53 +0100 (CET) Received: from notebook.linuxnetworks.de (B0171.b.pppool.de [213.7.1.113]) by post.webmailer.de (8.12.10/8.12.10) with ESMTP id hA8E9kMN019973; Sat, 8 Nov 2003 15:09:49 +0100 (MET) From: Norbert Sendetzky Organization: Linuxnetworks To: bert hubert Date: Sat, 8 Nov 2003 15:09:24 +0100 User-Agent: KMail/1.5.4 References: <200311071728.11605.norbert@linuxnetworks.de> In-Reply-To: <200311071728.11605.norbert@linuxnetworks.de> MIME-Version: 1.0 Message-Id: <200311081501.12791.norbert@linuxnetworks.de> Content-Type: Multipart/Mixed; boundary="Boundary-00=_UkPr/6O9PbGYPu7" cc: PDNS Developer Subject: [Pdns-dev] [patch] PowerLDAP - part 2 X-BeenThere: pdns-dev@mailman.powerdns.com X-Mailman-Version: 2.1.1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 14:09:54 -0000 --Boundary-00=_UkPr/6O9PbGYPu7 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bert This is part 2 of the PowerDNS cleanup. I've rewritten most of the code to achieve these goals: - - Support of parallel requests - - Support of timeouts per request - - Remove incorrect code in waitResult() - - Remove limitations regarding search results - - Fix memory leak in getSearchEntry() - - Add additional error checking - - Much more readable code The API remains the same, in case of the new timeout parameter, a default value of 5 sec is set if not specified otherwise. Norbert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj+s+RQACgkQxMLs5v5/7eCoAACeKt1VlP086+gm+lWEyuFCPmgO b+cAn3jK22mwPdh259rXuHHJ+K8i412U =8IMv -----END PGP SIGNATURE----- --Boundary-00=_UkPr/6O9PbGYPu7 Content-Type: text/x-diff; charset="iso-8859-15"; name="powerldap2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="powerldap2.diff" --- pdns-2.9.12.last/modules/ldapbackend/powerldap.hh Sat Nov 8 14:18:52 2003 +++ pdns-2.9.12/modules/ldapbackend/powerldap.hh Sat Nov 8 00:10:18 2003 @@ -36,12 +36,9 @@ class PowerLDAP { LDAP* d_ld; - int d_timeout; - LDAPMessage* d_searchresult; - LDAPMessage* d_searchentry; const string getError( int rc = -1 ); - int waitResult( int msgid = LDAP_RES_ANY, LDAPMessage** retresult = 0 ); + int waitResult( int msgid = LDAP_RES_ANY, int timeout = 0, LDAPMessage** result = NULL ); public: typedef map > sentry_t; @@ -56,8 +53,8 @@ void simpleBind( const string& ldapbinddn = "", const string& ldapsecret = "" ); int search( const string& base, int scope, const string& filter, const char** attr = 0 ); - bool getSearchEntry( int msgid, sentry_t& entry, bool withdn = false ); - void getSearchResults( int msgid, sresult_t& result, bool withdn = false ); + bool getSearchEntry( int msgid, sentry_t& entry, bool dn = false, int timeout = 5 ); + void getSearchResults( int msgid, sresult_t& result, bool dn = false, int timeout = 5 ); static const string escape( const string& tobe ); }; --- pdns-2.9.12.last/modules/ldapbackend/powerldap.cc Sat Nov 8 14:18:52 2003 +++ pdns-2.9.12/modules/ldapbackend/powerldap.cc Sat Nov 8 14:03:01 2003 @@ -2,7 +2,7 @@ -PowerLDAP::PowerLDAP( const string& host, u_int16_t port, bool tls ) : d_timeout( 5 ) +PowerLDAP::PowerLDAP( const string& host, u_int16_t port, bool tls ) { int protocol = LDAP_VERSION3; @@ -63,103 +63,129 @@ } -/** Function waits for a result, returns its type and optionally stores the result - in retresult. If returned via retresult, the caller is responsible for freeing - it with ldap_msgfree! */ -int PowerLDAP::waitResult(int msgid,LDAPMessage **retresult) -{ - struct timeval tv; - tv.tv_sec=d_timeout; - tv.tv_usec=0; - LDAPMessage *result; - - int rc=ldap_result(d_ld,msgid,0,&tv,&result); - if(rc==-1) - throw LDAPException("Error waiting for LDAP result: "+getError()); - if(!rc) - throw LDAPTimeout(); - - if(retresult) - *retresult=result; - - if(rc==LDAP_RES_SEARCH_ENTRY || LDAP_RES_SEARCH_RESULT) // no error in that case - return rc; - - int err; - if((err=ldap_result2error(d_ld, result,0))!=LDAP_SUCCESS) { - ldap_msgfree(result); - throw LDAPException("LDAP Server reported error: "+getError(err)); - } - - if(!retresult) - ldap_msgfree(result); - - return rc; -} - - -int PowerLDAP::search(const string& base, int scope, const string& filter, const char **attr) -{ - int msgid; - - if( ( msgid = ldap_search( d_ld, base.c_str(), scope, filter.c_str(),const_cast(attr),0 ) ) == -1 ) - throw LDAPException("Starting LDAP search: "+getError()); - - return msgid; -} - -bool PowerLDAP::getSearchEntry(int msgid, sentry_t &entry, bool wit