From: bert hubert Date: Sun, 14 Jul 2013 09:04:09 +0000 (+0200) Subject: our OPT testing appears to have been little-endian only, this might improve things X-Git-Tag: auth-3.3.1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fefd1a9d2822476c5b5b197f479ec37774a352b;p=thirdparty%2Fpdns.git our OPT testing appears to have been little-endian only, this might improve things --- diff --git a/pdns/test-dnsrecords_cc.cc b/pdns/test-dnsrecords_cc.cc index bc1c127edb..8ab872fe11 100644 --- a/pdns/test-dnsrecords_cc.cc +++ b/pdns/test-dnsrecords_cc.cc @@ -264,10 +264,10 @@ BOOST_AUTO_TEST_CASE(test_opt_record_out) { DNSPacketWriter pw(pak, "www.powerdns.com", ns_t_a); pw.startRecord("www.powerdns.com", ns_t_a, 16, 1, DNSPacketWriter::ANSWER); - pw.xfrIP(0x0100007f); + pw.xfrIP(htonl(0x7f000001)); opts.push_back(pair(3, "powerdns")); pw.addOpt(1280, 0, 0, opts); - pw.getHeader()->id = 0x01f0; + pw.getHeader()->id = htons(0xf001); pw.getHeader()->rd = 1; pw.commit();