Bug 1042873: Add the appropriate byte-order conversion to ChildDNSRecord::GetNextAddr r=mcmanus a=lmandel
--- a/netwerk/dns/DNSRequestChild.cpp
+++ b/netwerk/dns/DNSRequestChild.cpp
@@ -81,17 +81,17 @@ ChildDNSRecord::GetNextAddr(uint16_t por
{
if (mCurrent >= mLength) {
return NS_ERROR_NOT_AVAILABLE;
}
memcpy(addr, &mAddresses[mCurrent++], sizeof(NetAddr));
// both Ipv4/6 use same bits for port, so safe to just use ipv4's field
- addr->inet.port = port;
+ addr->inet.port = htons(port);
return NS_OK;
}
// shamelessly copied from nsDNSRecord
NS_IMETHODIMP
ChildDNSRecord::GetScriptableNextAddr(uint16_t port, nsINetAddr **result)
{