Fix endianness of pool addresses

Rushed in 64cbb9b but still broken.
This commit is contained in:
Davide De Rosa 2018-11-02 13:46:38 +01:00
parent e880192be5
commit d756948872
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ struct Pool: Codable, Comparable, CustomStringConvertible {
// XXX: inefficient, can't easily use lazy on struct
func addresses(sorted: Bool) -> [String] {
var addrs = (sorted ? numericAddresses.sorted() : numericAddresses).map {
return DNSResolver.string(fromIPv4: $0)
return DNSResolver.string(fromIPv4: UInt32(bigEndian: $0))
}
addrs.insert(hostname, at: 0)
return addrs