Merge pull request #23 from keeshux/provider-endpoints-endianness

Provider IPv4 endpoints appear reversed
This commit is contained in:
Davide De Rosa 2018-11-02 14:05:42 +01:00 committed by GitHub
commit 35882e24d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Incorrect compression warnings when importing host configurations. [#20](https://github.com/keeshux/passepartout-ios/pull/20)
- Regression in provider endpoints, IPv4 appearing reversed. [#23](https://github.com/keeshux/passepartout-ios/pull/23)
## 1.0 RC1 1194 (2018-11-01)

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