diff options
-rw-r--r-- | interface-definitions/wireguard.xml | 2 | ||||
-rwxr-xr-x | src/validators/cidr | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/interface-definitions/wireguard.xml b/interface-definitions/wireguard.xml index 8c2cc9d96..1e22c6f2e 100644 --- a/interface-definitions/wireguard.xml +++ b/interface-definitions/wireguard.xml @@ -20,7 +20,7 @@ <properties> <help>IP address</help> <constraint> - <validator name="ip-host"/> + <validator name="cidr"/> </constraint> <valueHelp> <format>ipv4-address</format> diff --git a/src/validators/cidr b/src/validators/cidr new file mode 100755 index 000000000..815aa8ba1 --- /dev/null +++ b/src/validators/cidr @@ -0,0 +1,3 @@ +#!/bin/sh + +ipaddrcheck --is-any-cidr $1 |