summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-11 10:26:47 +0100
committerChristian Poessinger <christian@poessinger.com>2022-01-11 10:28:00 +0100
commite89f48269e96f0b558dd3d427c4cc89abd585c3f (patch)
treebe1f1f97e30305ee24406c571f6ee439da5d7ad5 /interface-definitions
parentc0d65731d904832eb8709e32950d3fdbc89c9b5b (diff)
downloadvyos-1x-e89f48269e96f0b558dd3d427c4cc89abd585c3f.tar.gz
vyos-1x-e89f48269e96f0b558dd3d427c4cc89abd585c3f.zip
policy: T2199: add missing rule constraints
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/policy-route.xml.in24
1 files changed, 20 insertions, 4 deletions
diff --git a/interface-definitions/policy-route.xml.in b/interface-definitions/policy-route.xml.in
index ed726d1e4..ee456a82b 100644
--- a/interface-definitions/policy-route.xml.in
+++ b/interface-definitions/policy-route.xml.in
@@ -4,7 +4,7 @@
<children>
<tagNode name="ipv6-route" owner="${vyos_conf_scripts_dir}/policy-route.py">
<properties>
- <help>IPv6 policy route rule set name</help>
+ <help>Policy route rule set name for IPv6</help>
<priority>201</priority>
</properties>
<children>
@@ -12,7 +12,15 @@
#include <include/firewall/name-default-log.xml.i>
<tagNode name="rule">
<properties>
- <help>Rule number (1-9999)</help>
+ <help>Policy rule number</help>
+ <valueHelp>
+ <format>u32:1-999999</format>
+ <description>Number of policy rule</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-999999"/>
+ </constraint>
+ <constraintErrorMessage>Policy rule number must be between 1 and 999999</constraintErrorMessage>
</properties>
<children>
<node name="destination">
@@ -42,7 +50,7 @@
</tagNode>
<tagNode name="route" owner="${vyos_conf_scripts_dir}/policy-route.py">
<properties>
- <help>Policy route rule set name</help>
+ <help>Policy route rule set name for IPv4</help>
<priority>201</priority>
</properties>
<children>
@@ -50,7 +58,15 @@
#include <include/firewall/name-default-log.xml.i>
<tagNode name="rule">
<properties>
- <help>Rule number (1-9999)</help>
+ <help>Policy rule number</help>
+ <valueHelp>
+ <format>u32:1-999999</format>
+ <description>Number of policy rule</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-999999"/>
+ </constraint>
+ <constraintErrorMessage>Policy rule number must be between 1 and 999999</constraintErrorMessage>
</properties>
<children>
<node name="destination">