From 696de71969d8e383c9cee31e06d34cef742579f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cl=C3=A9ment?= Date: Thu, 8 Apr 2021 16:52:33 +0200 Subject: [PATCH] Allow non IP value in DNS --- model/server.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/model/server.go b/model/server.go index b9f148cf..5e369a2a 100644 --- a/model/server.go +++ b/model/server.go @@ -56,12 +56,7 @@ func (a Server) IsValid() []error { if a.Mtu < 0 { errs = append(errs, fmt.Errorf("MTU %d is invalid", a.PersistentKeepalive)) } - // check if the address are valid - for _, dns := range a.Dns { - if !util.IsValidIp(dns) { - errs = append(errs, fmt.Errorf("dns %s is invalid", dns)) - } - } + // check if the allowedIPs are valid for _, allowedIP := range a.AllowedIPs { if !util.IsValidCidr(allowedIP) {