diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-05-12 19:23:15 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-05-16 15:30:26 +0200 |
commit | 1330898ed095b42b6aba7ba00f9a6932b241a230 (patch) | |
tree | cd4e524fd1d91ded256f918007c97184be537fbd /src/validators/ipv4-address-exclude | |
parent | 728e1c6073cb216d3cb8b66f519bd590458165e6 (diff) | |
download | vyos-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-x | src/validators/ipv4-address-exclude | 7 |
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}" |