Extend validators to work for DNS entries as well.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -29,7 +29,7 @@ extension Interface {
|
||||
|
||||
try dns?.commaSeparatedToArray().forEach { address in
|
||||
do {
|
||||
try _ = Endpoint(endpointString: address)
|
||||
try _ = Endpoint(endpointString: address, needsPort: false)
|
||||
} catch {
|
||||
throw InterfaceValidationError.invalidDNSServer(cause: error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user