summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <rbays@roatan.(none)>2010-06-08 12:26:44 -0700
committerRobert Bays <rbays@roatan.(none)>2010-06-08 12:26:44 -0700
commit85012ac0520e0662e6cf321c745bb988b191184a (patch)
treee653bf579aaccf9467d33a974a7b952d2201544f
parent1e8d7504c3074d78c7078b601404a510211ed3be (diff)
downloadvyatta-cfg-quagga-85012ac0520e0662e6cf321c745bb988b191184a.tar.gz
vyatta-cfg-quagga-85012ac0520e0662e6cf321c745bb988b191184a.zip
fix for bug 874: allow setting administrative distance
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl20
-rw-r--r--templates/protocols/bgp/node.tag/address-family/ipv6-unicast/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/global/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/node.def1
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def6
-rw-r--r--templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def5
10 files changed, 53 insertions, 2 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index ae496a65..444f6bde 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -611,6 +611,26 @@ my %qcom = (
set => 'router bgp #3 ; no bgp network import-check',
del => 'router bgp #3 ; bgp network import-check',
},
+ 'protocols bgp var parameters distance' => {
+ set => undef,
+ del => undef,
+ },
+ 'protocols bgp var parameters distance global' => {
+ set => 'router bgp #3 ; distance bgp @external @internal @local',
+ del => 'router bgp #3 ; no distance bgp',
+ },
+ 'protocols bgp var parameters distance prefix' => {
+ set => undef,
+ del => undef,
+ },
+ 'protocols bgp var parameters distance prefix var' => {
+ set => undef,
+ del => undef,
+ },
+ 'protocols bgp var parameters distance prefix var distance' => {
+ set => 'router bgp #3 ; distance #9 #7 ',
+ del => 'router bgp #3 ; no distance #9 #7',
+ },
'protocols bgp var parameters enforce-first-as' => {
set => 'router bgp #3 ; bgp enforce-first-as',
del => 'router bgp #3 ; no bgp enforce-first-as',
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/node.def
index f99077e1..1a8f732e 100644
--- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/node.def
+++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/node.def
@@ -1 +1 @@
-help: Set BGP IPv6 parameters
+help: Set a BGP IPv6 settings
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def
index 870dabb0..ed278b7f 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def
@@ -1 +1 @@
-help: Set BGP neighbor address-family parameters
+help: Set parameters relating to IPv4 or IPv6 routes
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def
new file mode 100644
index 00000000..49039a49
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: Set an administrative distance for external BGP routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+comp_help: possible completions:
+ <1-255> Set administrative distance for external BGP routes
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def
new file mode 100644
index 00000000..a7d68e2b
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: Set an administrative distance for internal BGP routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+comp_help: possible completions:
+ <1-255> Set administrative distance for internal BGP routes
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def
new file mode 100644
index 00000000..ab98b327
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: Set an administrative distance for local BGP routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+comp_help: possible completions:
+ <1-255> Set administrative distance for local BGP routes
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def
new file mode 100644
index 00000000..ea7a99ef
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def
@@ -0,0 +1,4 @@
+help: Set global administratives distances for BGP routes
+commit:expression: $VAR(./external/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an external route distance"
+commit:expression: $VAR(./internal/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an internal route distance"
+commit:expression: $VAR(./local/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set a local route distance"
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/node.def
new file mode 100644
index 00000000..ef0704e2
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/node.def
@@ -0,0 +1 @@
+help: Set administratives distances for BGP routes
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def
new file mode 100644
index 00000000..a8b0823c
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def
@@ -0,0 +1,6 @@
+tag:
+type: ipv4net
+help: Set an administrative distance for a specific BGP prefix
+comp_help: \1 <x.x.x.x/x>\tprefix
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+commit:expression: $VAR(./distance/) != ""; "protocols bgp $VAR(../../../@) parameters distance prefix $VAR(@): you must set a route distance for this prefix"
diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def
new file mode 100644
index 00000000..37f9f625
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: Set an administrative distance for prefix
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+comp_help: possible completions:
+ <1-255> Set administrative distance for external BGP routes