mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-08 02:06:06 +08:00
adding ipv6 details. Need to test now
This commit is contained in:
@@ -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 == ""
|
||||
|
Reference in New Issue
Block a user