summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-10 22:31:55 +0100
committerGitHub <noreply@github.com>2022-01-10 22:31:55 +0100
commit465939d9c9b413c7033c8833cbb4ebc30b9bcf66 (patch)
tree361079ff54ed2c5516cc86a8644e98ce629d2a73 /interface-definitions
parentfd1b1ff19b0ff852d796e979ab3b596651686f2f (diff)
parent0a0e7d789e7e482b65cbca47bff1dcb427891a88 (diff)
downloadvyos-1x-465939d9c9b413c7033c8833cbb4ebc30b9bcf66.tar.gz
vyos-1x-465939d9c9b413c7033c8833cbb4ebc30b9bcf66.zip
Merge pull request #1152 from sarthurdev/firewall_validators
firewall: validators: T4148: Improve validators and firewall validator usage
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/firewall.xml.in3
-rw-r--r--interface-definitions/include/firewall/port.xml.i5
2 files changed, 7 insertions, 1 deletions
diff --git a/interface-definitions/firewall.xml.in b/interface-definitions/firewall.xml.in
index 78a48a522..07a36093f 100644
--- a/interface-definitions/firewall.xml.in
+++ b/interface-definitions/firewall.xml.in
@@ -182,6 +182,9 @@
<description>Numbered port range (e.g. 1001-1050)</description>
</valueHelp>
<multi/>
+ <constraint>
+ <validator name="port-range"/>
+ </constraint>
</properties>
</leafNode>
</children>
diff --git a/interface-definitions/include/firewall/port.xml.i b/interface-definitions/include/firewall/port.xml.i
index 59d92978b..3bacafff8 100644
--- a/interface-definitions/include/firewall/port.xml.i
+++ b/interface-definitions/include/firewall/port.xml.i
@@ -16,8 +16,11 @@
</valueHelp>
<valueHelp>
<format> </format>
- <description>\n\n Multiple destination ports can be specified as a comma-separated list.\n The whole list can also be negated using '!'.\n For example: '!22,telnet,http,123,1001-1005'</description>
+ <description>\n\n Multiple destination ports can be specified as a comma-separated list.\n For example: 'telnet,http,123,1001-1005'</description>
</valueHelp>
+ <constraint>
+ <validator name="port-multi"/>
+ </constraint>
</properties>
</leafNode>
<!-- include end -->