Extend validators to work for DNS entries as well.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts
2018-08-16 22:41:45 +02:00
parent bf3510765a
commit 5a7e67b53c
2 changed files with 19 additions and 13 deletions
+1 -1
View File
@@ -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)
}