From: Bert Hubert Date: Wed, 1 Jul 2009 20:17:37 +0000 (+0000) Subject: we had some htonls in a twist for xfrIP.. hopefully this is the right fix X-Git-Tag: rec-3.2~153 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79a9e9ad6def2b5a4db950d19dc56df46758febf;p=pdns we had some htonls in a twist for xfrIP.. hopefully this is the right fix git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1369 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index 0eaa08aa6..0599f3d2c 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -81,6 +81,7 @@ public: void xfrIP(uint32_t& val) { xfr32BitInt(val); + val=htonl(val); } void xfrTime(uint32_t& val) @@ -149,7 +150,7 @@ public: virtual std::string getZoneRepresentation() const = 0; virtual ~DNSRecordContent() {} virtual void toPacket(DNSPacketWriter& pw)=0; - virtual string serialize(const string& qname) + virtual string serialize(const string& qname) // it would rock if this were const, but it is too hard { vector packet; string empty; diff --git a/pdns/rcpgenerator.cc b/pdns/rcpgenerator.cc index 37d46f955..064c65cd7 100644 --- a/pdns/rcpgenerator.cc +++ b/pdns/rcpgenerator.cc @@ -330,7 +330,7 @@ void RecordTextWriter::xfrIP(const uint32_t& val) d_string.append(1,' '); char tmp[17]; - uint32_t ip=htonl(val); + uint32_t ip=val; uint8_t vals[4]; memcpy(&vals[0], &ip, sizeof(ip));