summaryrefslogtreecommitdiff
path: root/src/validators/ipv4-address-exclude
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-12 19:23:15 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-16 15:30:26 +0200
commit1330898ed095b42b6aba7ba00f9a6932b241a230 (patch)
treecd4e524fd1d91ded256f918007c97184be537fbd /src/validators/ipv4-address-exclude
parent728e1c6073cb216d3cb8b66f519bd590458165e6 (diff)
downloadvyos-1x-1330898ed095b42b6aba7ba00f9a6932b241a230.tar.gz
vyos-1x-1330898ed095b42b6aba7ba00f9a6932b241a230.zip
nat: T2198: add ipv4-{address,prefix,rage}-exclude validators
Exclude validators are required to support the ! (not) operator on the CLI to exclude addresses from NAT.
Diffstat (limited to 'src/validators/ipv4-address-exclude')
-rwxr-xr-xsrc/validators/ipv4-address-exclude7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/validators/ipv4-address-exclude b/src/validators/ipv4-address-exclude
new file mode 100755
index 000000000..80ad17d45
--- /dev/null
+++ b/src/validators/ipv4-address-exclude
@@ -0,0 +1,7 @@
+#!/bin/sh
+arg="$1"
+if [ "${arg:0:1}" != "!" ]; then
+ exit 1
+fi
+path=$(dirname "$0")
+${path}/ipv4-address "${arg:1}"