From d2592393d6a60e700e13bbd0caf8d5d68628fa5f Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Mon, 13 Jan 2003 23:05:15 +0000 Subject: [PATCH] fixes git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@132 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dnspacket.cc | 28 +++++++++------------------- pdns/dnspacket.hh | 4 ++-- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index 384526dd4..a4ecbe8bb 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// $Id: dnspacket.cc,v 1.11 2003/01/13 15:39:16 ahu Exp $ +// $Id: dnspacket.cc,v 1.12 2003/01/13 23:05:15 ahu Exp $ #include "utility.hh" #include @@ -246,13 +246,7 @@ void DNSPacket::addARecord(const string &name, u_int32_t ip, u_int32_t ttl, DNSR toqname(name, &piece1); char p[14]; - - p[0]=0; - p[1]=1; // A - p[2]=0; - p[3]=1; // IN - - putLong(p+4, ttl); + makeHeader(p,QType::A,ttl); p[8]=0; p[9]=4; // length of data @@ -273,7 +267,7 @@ void DNSPacket::addAAAARecord(const DNSResourceRecord &rr) #ifdef HAVE_IPV6 if( Utility::inet_pton( AF_INET6, rr.content.c_str(), static_cast< void * >( addr ))) - addAAAARecord(rr.qname, addr, rr.ttl); + addAAAARecord(rr.qname, addr, rr.ttl,rr.d_place); else #endif L<