diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-17 18:59:00 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-06-18 07:25:26 +0200 |
commit | 5e653da788469cc70004c928e64a0d931e29eb77 (patch) | |
tree | 514f91a8c2036895ecc3e4db7dc7c6e63c22025a | |
parent | 20a2848b298753f65a44d5c2f1fc3d7cf5801517 (diff) | |
download | vyatta-cfg-quagga-5e653da788469cc70004c928e64a0d931e29eb77.tar.gz vyatta-cfg-quagga-5e653da788469cc70004c928e64a0d931e29eb77.zip |
route-map: T3632: fix invalid validation regex for extcommunity-rt and extcommunity-soo
Use the validation string/system available within vyos-1x. This also
works also on VyOS 1.2 series systems.
(cherry picked from commit 2c6ec4330384606fb25b8afb5ef1831320715917)
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-rt/node.def | 6 | ||||
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/extcommunity-soo/node.def | 8 |
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" \ |