summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-19 12:28:38 +0200
committerGitHub <noreply@github.com>2021-06-19 12:28:38 +0200
commit3dfc2e9b90e7284201ee8d5c0fdebd4b4003b122 (patch)
tree4fb1dde07585c4ee0fc5ac8721b28713fac546c7
parent4318d6c3c93191c5f815255d4961b1deb190f6ad (diff)
parent5e653da788469cc70004c928e64a0d931e29eb77 (diff)
downloadvyatta-cfg-quagga-3dfc2e9b90e7284201ee8d5c0fdebd4b4003b122.tar.gz
vyatta-cfg-quagga-3dfc2e9b90e7284201ee8d5c0fdebd4b4003b122.zip
Merge pull request #83 from c-po/equuleus
route-map: T3632: fix invalid validation regex for extcommunity-rt and extcommunity-soo
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def6
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def8
2 files changed, 9 insertions, 5 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def
index 6338ca50..e536c698 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def
@@ -1,8 +1,10 @@
type: txt
help: Set route target value
-val_help: ASN:nn_or_IP_address:nn VPN extended community
+val_help: ASN:NN; based on autonomous system number
+val_help: IP:NN; Based on a router-id IP address
+
+syntax:expression: exec "${vyos_libexec_dir}/validate-value --regex \'^((?:[0-9]{1,3}\\.){3}[0-9]{1,3}|\\d+):\\d+$\' --value \'$VAR(@)\'"; "Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number"
-syntax:expression: pattern $VAR(@) "\d+:\d+(\.\d+\.\d+\.\d+):\d+" ; "Should be in form: ASN:nn_or_IP_address:nn where ASN is autonomous system number"
commit:expression: $VAR(../../action/) != ""; "you must specify an action"
update: vtysh -c "configure terminal" \
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def
index e76243dd..51f6bb5c 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def
@@ -1,8 +1,10 @@
type: txt
-help: Set Site of Origin value.
-val_help: ASN:nn_or_IP_address:nn VPN extended community
+help: Set Site of Origin value.
+val_help: ASN:NN; based on autonomous system number
+val_help: IP:NN; Based on a router-id IP address
+
+syntax:expression: exec "${vyos_libexec_dir}/validate-value --regex \'^((?:[0-9]{1,3}\\.){3}[0-9]{1,3}|\\d+):\\d+$\' --value \'$VAR(@)\'"; "Should be in form: ASN:NN or IPADDR:NN where ASN is autonomous system number"
-syntax:expression: pattern $VAR(@) "\d+:\d+(\.\d+\.\d+\.\d+):\d+" ; "Should be in form: ASN:nn_or_IP_address:nn where ASN is autonomous system number"
commit:expression: $VAR(../../action/) != ""; "you must specify an action"
update: vtysh -c "configure terminal" \