summaryrefslogtreecommitdiff
path: root/interface-definitions/nat.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-12 18:44:20 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-16 15:30:26 +0200
commit728e1c6073cb216d3cb8b66f519bd590458165e6 (patch)
treef51952557bbeb66d998a81e1dc4ba72cba4673da /interface-definitions/nat.xml.in
parentcc2ad34ce61e205454c4676a5bde77629d463964 (diff)
downloadvyos-1x-728e1c6073cb216d3cb8b66f519bd590458165e6.tar.gz
vyos-1x-728e1c6073cb216d3cb8b66f519bd590458165e6.zip
nat: T2198: add new ipv4-range validator
Diffstat (limited to 'interface-definitions/nat.xml.in')
-rw-r--r--interface-definitions/nat.xml.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/interface-definitions/nat.xml.in b/interface-definitions/nat.xml.in
index bcbdb37af..af9dd1eff 100644
--- a/interface-definitions/nat.xml.in
+++ b/interface-definitions/nat.xml.in
@@ -95,7 +95,12 @@
<format>masquerade</format>
<description>NAT to the primary address of outbound-interface</description>
</valueHelp>
- <!-- TODO: add general iptables constraint script -->
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ <validator name="ipv4-address"/>
+ <validator name="ipv4-range"/>
+ <regex>(masquerade)</regex>
+ </constraint>
</properties>
</leafNode>
#include <include/nat-translation-port.xml.i>