]> granicus.if.org Git - pdns/commitdiff
we had some htonls in a twist for xfrIP.. hopefully this is the right fix
authorBert Hubert <bert.hubert@netherlabs.nl>
Wed, 1 Jul 2009 20:17:37 +0000 (20:17 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Wed, 1 Jul 2009 20:17:37 +0000 (20:17 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1369 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnsparser.hh
pdns/rcpgenerator.cc

index 0eaa08aa69733019f7c995a8dff8799422347288..0599f3d2c682c859fd73cfeecc98589ffa62131b 100644 (file)
@@ -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<uint8_t> packet;
     string empty;
index 37d46f955385efdcf63daef6a66f7145f07f2dd2..064c65cd7b293556a592b29a2f7f7561567bbb12 100644 (file)
@@ -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));