summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-17 19:04:47 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-17 19:04:47 +0200
commit1db31230890811d701a3d64c1571e3d4bfa4b3d4 (patch)
treecdb5802ad19671d8aa129f3e37f18d8977e2a184
parent3017afcc0079dd26f7a521dcf62e83def3fad139 (diff)
downloadvyos-1x-1db31230890811d701a3d64c1571e3d4bfa4b3d4.tar.gz
vyos-1x-1db31230890811d701a3d64c1571e3d4bfa4b3d4.zip
route-map: T3632: fix invalid validation regex for extcommunity-rt|soo
Use the validation string/system available within vyos-1x. This also works on VyOS 1.2 series systems.
-rw-r--r--interface-definitions/policy.xml.in24
1 files changed, 20 insertions, 4 deletions
diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in
index 8cba17330..6a002cc20 100644
--- a/interface-definitions/policy.xml.in
+++ b/interface-definitions/policy.xml.in
@@ -1031,18 +1031,34 @@
<properties>
<help>Set route target value</help>
<valueHelp>
- <format>txt</format>
- <description>ASN:nn_or_IP_address:nn VPN extended community</description>
+ <format>ASN:NN</format>
+ <description>based on autonomous system number</description>
+ </valueHelp>
+ <valueHelp>
+ <format>IP:NN</format>
+ <description>Based on a router-id IP address</description>
</valueHelp>
+ <constraint>
+ <regex>^((?:[0-9]{1,3}\.){3}[0-9]{1,3}|\d+):\d+$</regex>
+ </constraint>
+ <constraintErrorMessage>Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="soo">
<properties>
<help>Set Site of Origin value</help>
<valueHelp>
- <format>txt</format>
- <description>ASN:nn_or_IP_address:nn VPN extended community</description>
+ <format>ASN:NN</format>
+ <description>based on autonomous system number</description>
+ </valueHelp>
+ <valueHelp>
+ <format>IP:NN</format>
+ <description>Based on a router-id IP address</description>
</valueHelp>
+ <constraint>
+ <regex>^((?:[0-9]{1,3}\.){3}[0-9]{1,3}|\d+):\d+$</regex>
+ </constraint>
+ <constraintErrorMessage>Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number</constraintErrorMessage>
</properties>
</leafNode>
</children>