summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-08-03 19:49:36 +0700
committerGitHub <noreply@github.com>2019-08-03 19:49:36 +0700
commitf0c171987c239b811845df499dd806af60249cf0 (patch)
tree45a60e26aa175efcac9fe0780b35dfe9f3588b65 /templates
parent20f0f4f2a3c8cef3aba5aa1b6df695078d04ce4c (diff)
parent3a1680ceef8ffc25943be9e626fa9286e1fb2920 (diff)
downloadvyatta-cfg-quagga-f0c171987c239b811845df499dd806af60249cf0.tar.gz
vyatta-cfg-quagga-f0c171987c239b811845df499dd806af60249cf0.zip
Merge pull request #33 from DmitriyEshenko/current
T1468 Adding check for additional values internal and external
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def5
4 files changed, 16 insertions, 4 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
index 1cf52947..84f13a6a 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
@@ -1,2 +1,5 @@
help: Neighbor as a IPv4-route reflector client
-commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ]; then echo \"remote-as must equal local-as\"; exit 1; fi; "
+commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ] && \
+ [ $VAR(../../../remote-as/@) != \"internal\" ] && \
+ [ $VAR(../../../remote-as/@) != \"external\" ]; \
+ then echo \"remote-as must equal local-as\"; exit 1; fi; "
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
index 7d6cf46d..c49ef8b9 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
@@ -1,2 +1,5 @@
help: Neighbor as a route reflector client
-commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ]; then echo \"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as\"; exit 1; fi; "
+commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ] && \
+ [ $VAR(../../../remote-as/@) != \"internal\" ] && \
+ [ $VAR(../../../remote-as/@) != \"external\" ]; \
+ then echo \"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as\"; exit 1; fi; "
diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
index fde76a74..9c8cfe1d 100644
--- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
+++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv4-unicast/route-reflector-client/node.def
@@ -1,2 +1,5 @@
help: Peer-group as a route reflector client
-commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ]; then echo \"remote-as must equal local-as\"; exit 1; fi; "
+commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ] && \
+ [ $VAR(../../../remote-as/@) != \"internal\" ] && \
+ [ $VAR(../../../remote-as/@) != \"external\" ]; \
+ then echo \"remote-as must equal local-as\"; exit 1; fi; "
diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
index fde76a74..9c8cfe1d 100644
--- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
+++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def
@@ -1,2 +1,5 @@
help: Peer-group as a route reflector client
-commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ]; then echo \"remote-as must equal local-as\"; exit 1; fi; "
+commit:expression: exec "if [ $VAR(../../../../@) != $VAR(../../../remote-as/@) ] && \
+ [ $VAR(../../../remote-as/@) != \"internal\" ] && \
+ [ $VAR(../../../remote-as/@) != \"external\" ]; \
+ then echo \"remote-as must equal local-as\"; exit 1; fi; "