adding ipv6 details. Need to test now

This commit is contained in:
afeiszli
2021-04-27 23:17:59 -04:00
parent a12c92a2e4
commit a0dd5929cb
7 changed files with 111 additions and 38 deletions

View File

@@ -661,9 +661,9 @@ func createGateway(w http.ResponseWriter, r *http.Request) {
func validateGateway(gateway models.GatewayRequest) error {
var err error
isIpv4 := functions.IsIpv4CIDR(gateway.RangeString)
isIp := functions.IsIpCIDR(gateway.RangeString)
empty := gateway.RangeString == ""
if empty || !isIpv4 {
if empty || !isIp {
err = errors.New("IP Range Not Valid")
}
empty = gateway.Interface == ""