mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-04-01 16:36:52 +00:00
Merge 696de71969
into 4fd1e34f5f
This commit is contained in:
commit
88fcfcc6a2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user