| Index: net/dns/dns_response.cc
|
| diff --git a/net/dns/dns_response.cc b/net/dns/dns_response.cc
|
| index 725629bf847244dc9140079f09c05df31a83f70c..4ad6465fbfd8ce8ffc51fa9a312783b0cd23b252 100644
|
| --- a/net/dns/dns_response.cc
|
| +++ b/net/dns/dns_response.cc
|
| @@ -149,11 +149,11 @@ bool DnsResponse::InitParse(int nbytes, const DnsQuery& query) {
|
| return false;
|
|
|
| // Match the query id.
|
| - if (ntohs(header()->id) != query.id())
|
| + if (base::NetToHost16(header()->id) != query.id())
|
| return false;
|
|
|
| // Match question count.
|
| - if (ntohs(header()->qdcount) != 1)
|
| + if (base::NetToHost16(header()->qdcount) != 1)
|
| return false;
|
|
|
| // Match the question section.
|
| @@ -177,17 +177,17 @@ bool DnsResponse::IsValid() const {
|
|
|
| uint16 DnsResponse::flags() const {
|
| DCHECK(parser_.IsValid());
|
| - return ntohs(header()->flags) & ~(dns_protocol::kRcodeMask);
|
| + return base::NetToHost16(header()->flags) & ~(dns_protocol::kRcodeMask);
|
| }
|
|
|
| uint8 DnsResponse::rcode() const {
|
| DCHECK(parser_.IsValid());
|
| - return ntohs(header()->flags) & dns_protocol::kRcodeMask;
|
| + return base::NetToHost16(header()->flags) & dns_protocol::kRcodeMask;
|
| }
|
|
|
| unsigned DnsResponse::answer_count() const {
|
| DCHECK(parser_.IsValid());
|
| - return ntohs(header()->ancount);
|
| + return base::NetToHost16(header()->ancount);
|
| }
|
|
|
| base::StringPiece DnsResponse::qname() const {
|
|
|