summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2009-07-09 18:29:13 -0700
committerBob Gilligan <gilligan@vyatta.com>2009-07-09 18:29:13 -0700
commit94e3e519ddb67e70e47015fca552fec264039c80 (patch)
treea9cc1ab2c8703ffc692774d267d7ba7158c650c0
parent33336fff1ce8845fdd39686342975b1349c59467 (diff)
parent1727949b57428d94569130e84c77a12d7a2a71fb (diff)
downloadvyatta-cfg-quagga-94e3e519ddb67e70e47015fca552fec264039c80.tar.gz
vyatta-cfg-quagga-94e3e519ddb67e70e47015fca552fec264039c80.zip
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg-quagga into kenwood
-rw-r--r--debian/changelog18
-rwxr-xr-xgen-interface-templates.pl2
-rw-r--r--interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def1
-rw-r--r--interface-templates/ip/rip/authentication/md5/node.tag/node.def1
-rwxr-xr-xscripts/quagga-manager21
-rw-r--r--templates/protocols/bgp/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def19
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def15
-rw-r--r--templates/protocols/bgp/node.tag/node.def0
-rw-r--r--templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/parameters/node.def1
-rw-r--r--templates/protocols/ospf/area/node.tag/network/node.def2
-rw-r--r--templates/protocols/ospf/area/node.tag/node.def3
-rw-r--r--templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/key-id/node.tag/node.def1
-rw-r--r--templates/protocols/ospf/area/node.tag/virtual-link/node.tag/node.def1
-rw-r--r--templates/protocols/ospf/passive-interface/node.def2
-rw-r--r--templates/protocols/ospfv3/area/node.tag/.filter-list/node.def3
-rw-r--r--templates/protocols/ospfv3/area/node.tag/node.def1
-rw-r--r--templates/protocols/rip/network-distance/node.tag/node.def1
-rw-r--r--templates/protocols/rip/passive-interface/node.def2
-rw-r--r--templates/protocols/ripng/passive-interface/node.def2
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/node.def1
-rw-r--r--templates/protocols/static/interface-route/node.tag/node.def1
-rw-r--r--templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/node.def1
-rw-r--r--templates/protocols/static/interface-route6/node.tag/node.def2
-rw-r--r--templates/protocols/static/route/node.tag/next-hop/node.tag/node.def2
-rw-r--r--templates/protocols/static/route/node.tag/node.def2
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def2
-rw-r--r--templates/protocols/static/route6/node.tag/node.def3
30 files changed, 67 insertions, 54 deletions
diff --git a/debian/changelog b/debian/changelog
index 9cc77845..0b9800dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+vyatta-cfg-quagga (0.18.27) unstable; urgency=low
+
+ * Abort transaction on delete of neighbor in peer group
+ * Convert template to new syntax
+ * Fix setup of protocols on boot
+ * Convert update: on mulitnodes to create:
+ * Add pseudo-ethernet
+ * Replace update tag on multi-nodes
+ * Use create to get remote-as to go first
+ * Allow status operations as non-root user
+ * Start bgpd earlier in process
+ * Use bgpd default import-check flag
+ * Fix OSPFv3 filter list node
+ * Remove bogus templates
+ * Remove hidden templates
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Thu, 09 Jul 2009 16:50:32 -0700
+
vyatta-cfg-quagga (0.18.26) unstable; urgency=low
* Bugfix 4546: Re-structure to avoid nested "end" field.
diff --git a/gen-interface-templates.pl b/gen-interface-templates.pl
index 5e17fa0c..8a5e12af 100755
--- a/gen-interface-templates.pl
+++ b/gen-interface-templates.pl
@@ -34,6 +34,8 @@ my %interface_hash = (
'ethernet/node.tag/pppoe/node.tag' => 'pppoe$VAR(@)',
'ethernet/node.tag/vif/node.tag' => '$VAR(../@).$VAR(@)',
'ethernet/node.tag/vif/node.tag/pppoe/node.tag' => 'pppoe$VAR(@)',
+ 'pseudo-ethernet/node.tag' => '$VAR(@)',
+ 'pseudo-ethernet/node.tag/vif/node.tag' => '$VAR(../@).$VAR(@)',
'bonding/node.tag' => '$VAR(@)',
'bonding/node.tag/vif/node.tag' => '$VAR(../@).$VAR(@)',
'tunnel/node.tag' => '$VAR(@)',
diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def
deleted file mode 100644
index d14a2583..00000000
--- a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set md5 key
diff --git a/interface-templates/ip/rip/authentication/md5/node.tag/node.def b/interface-templates/ip/rip/authentication/md5/node.tag/node.def
deleted file mode 100644
index 488acd8c..00000000
--- a/interface-templates/ip/rip/authentication/md5/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set authentication password
diff --git a/scripts/quagga-manager b/scripts/quagga-manager
index ff0c7f88..be0435b9 100755
--- a/scripts/quagga-manager
+++ b/scripts/quagga-manager
@@ -15,11 +15,6 @@ if [ $# -lt 1 ]; then
usage
fi
-if [ $EUID -ne 0 ]; then
- echo "must be root!"
- exit 1
-fi
-
pid_dir=/var/run/vyatta/quagga
log_dir=/var/log/vyatta/quagga
@@ -37,15 +32,21 @@ start() {
local pidfile=${pid_dir}/${daemon}.pid
local binpath=/usr/sbin/vyatta-$daemon
+ if [ $EUID -ne 0 ]; then
+ echo "must be root!"
+ exit 1
+ fi
+
if [ ! -x $binpath ]; then
echo "Unknown daemon $daemon"
return 1
fi
local -a args=( -d -P 0 -i $pidfile )
- if [ "$daemon" = "zebra" ]; then
- args+=( -l -S -s 1048576 )
- fi
+ case $daemon in
+ zebra) args+=( -l -S -s 1048576 );;
+ bgpd) args+=( -I );;
+ esac
exec start-stop-daemon --start --oknodo --quiet \
--chdir $log_dir --exec $binpath --pidfile $pidfile \
@@ -57,6 +58,10 @@ stop() {
local pidfile=${pid_dir}/${daemon}.pid
local binpath=/usr/sbin/vyatta-$daemon
+ if [ $EUID -ne 0 ]; then
+ echo "must be root!"
+ exit 1
+ fi
start-stop-daemon --stop --quiet --oknodo --retry 5 \
--exec $binpath --pidfile=$pidfile
rm -f $pidfile
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def
index 8e21f914..27d29523 100644
--- a/templates/protocols/bgp/node.def
+++ b/templates/protocols/bgp/node.def
@@ -6,9 +6,6 @@ syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \
"AS number must be between 1 and 4294967294"
begin: sudo /opt/vyatta/sbin/quagga-manager start bgpd
create: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)"
-# we need to set default parameters in BGP here since we can't do it in
-# startup scripts as we don't know the AS number at that point
-update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" \
- -c "bgp network import-check"
delete: vyatta-vtysh -c "configure terminal" -c "no router bgp $VAR(@)"
+
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def
index c9001078..6b30f7cd 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.def
@@ -8,6 +8,8 @@ comp_help:
syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \
--check-peer-name $VAR(@)"
+begin: sudo /opt/vyatta/sbin/quagga-manager start bgpd
+
create: if /opt/vyatta/sbin/vyatta-bgp.pl --check-if-peer-group \
--peergroup $VAR(@); then
vyatta-vtysh -c "configure terminal" \
@@ -16,7 +18,7 @@ create: if /opt/vyatta/sbin/vyatta-bgp.pl --check-if-peer-group \
fi;
delete: /opt/vyatta/sbin/vyatta-bgp.pl --check-peer-groups \
- --peergroup $VAR(@) --as $VAR(../@);
+ --peergroup $VAR(@) --as $VAR(../@) || exit 1
vyatta-vtysh -c "configure terminal" \
-c "router bgp $VAR(../@)" \
-c "no neighbor $VAR(@)"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
index 73f1768f..8edd77c8 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def
@@ -1,14 +1,13 @@
help: Set capability to send the ORF
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)"
commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)"
-update:expression: "if [ -n \"$VAR(../../../../remote-as/@)\" ]; then \
- peer=\"remote-as $VAR(../../../../remote-as/@)\"; \
- else \
- peer=\"peer-group $VAR(../../../../peer-group/@)\"; \
- fi; \
- vyatta-vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \
- -c \"neighbor $VAR(../../../../@) $peer\" \
- -c \"neighbor $VAR(../../../../@) capability orf prefix-list send\" "
-delete:expression: "vyatta-vtysh --noerror -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \
- -c \"no neighbor $VAR(../../../../@) capability orf prefix-list send\" "
+update: if [ -n "$VAR(../../../../remote-as/@)" ]
+ then peer="remote-as $VAR(../../../../remote-as/@)"
+ else peer="peer-group $VAR(../../../../peer-group/@)"
+ fi
+ vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../../../@)" \
+ -c "neighbor $VAR(../../../../@) $peer" \
+ -c "neighbor $VAR(../../../../@) capability orf prefix-list send" "
+delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../../../../@)" \
+ -c "no neighbor $VAR(../../../../@) capability orf prefix-list send" "
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
index 0381d22b..453527aa 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
@@ -1,11 +1,24 @@
type: u32
-priority: 1
help: Set neighbor BGP AS number
comp_help:
<1-4294967294> AS number
syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \
"remote-as must be between 1 and 4294967294"
+begin: sudo /opt/vyatta/sbin/quagga-manager start bgpd
+
+# Create action so this leaf is done before others
+create: vyatta-vtysh -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "neighbor $VAR(../@) remote-as $VAR(@)";
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@)
+ then
+ vyatta-vtysh -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "no neighbor $VAR(../@) activate" \
+ -c "address-family ipv6" \
+ -c "neighbor $VAR(../@) activate";
+ fi
update: vyatta-vtysh -c "configure terminal" \
-c "router bgp $VAR(../../@)" \
diff --git a/templates/protocols/bgp/node.tag/node.def b/templates/protocols/bgp/node.tag/node.def
deleted file mode 100644
index e69de29b..00000000
--- a/templates/protocols/bgp/node.tag/node.def
+++ /dev/null
diff --git a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
index 1f043d41..2a763ae2 100644
--- a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
+++ b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def
@@ -3,7 +3,7 @@ type: u32
help: Set the peer ASs in the BGP confederation
comp_help: \1 <1-4294967294>\tpeer AS number numbers (ex: "435 234")
syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294"
-update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \
+create: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \
-c "bgp confederation peers $VAR(@)"
delete: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \
-c "no bgp confederation peers $VAR(@)"
diff --git a/templates/protocols/bgp/node.tag/parameters/node.def b/templates/protocols/bgp/node.tag/parameters/node.def
index 6bb752b5..6711aac1 100644
--- a/templates/protocols/bgp/node.tag/parameters/node.def
+++ b/templates/protocols/bgp/node.tag/parameters/node.def
@@ -1 +1,2 @@
help: Set BGP parameters
+begin: sudo /opt/vyatta/sbin/quagga-manager start bgpd
diff --git a/templates/protocols/ospf/area/node.tag/network/node.def b/templates/protocols/ospf/area/node.tag/network/node.def
index 6f8e69d6..99e6cf7e 100644
--- a/templates/protocols/ospf/area/node.tag/network/node.def
+++ b/templates/protocols/ospf/area/node.tag/network/node.def
@@ -2,7 +2,7 @@ multi:
type: ipv4net
help: Set OSPF network
syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
-update:vyatta-vtysh -c "configure terminal" \
+create:vyatta-vtysh -c "configure terminal" \
-c "router ospf" -c "network $VAR(@) area $VAR(../@)"
delete:vyatta-vtysh -c "configure terminal" \
-c "router ospf" -c "no network $VAR(@) area $VAR(../@)"
diff --git a/templates/protocols/ospf/area/node.tag/node.def b/templates/protocols/ospf/area/node.tag/node.def
deleted file mode 100644
index 7d080287..00000000
--- a/templates/protocols/ospf/area/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Set IPv4 network
-
-
diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/key-id/node.tag/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/key-id/node.tag/node.def
deleted file mode 100644
index 3d83feec..00000000
--- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/key-id/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set MD5 key
diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/node.def
deleted file mode 100644
index 6eb2820b..00000000
--- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set virtual link
diff --git a/templates/protocols/ospf/passive-interface/node.def b/templates/protocols/ospf/passive-interface/node.def
index b469f1c7..09321d9f 100644
--- a/templates/protocols/ospf/passive-interface/node.def
+++ b/templates/protocols/ospf/passive-interface/node.def
@@ -2,7 +2,7 @@ multi:
type: txt
help: Set to suppress routing updates on an interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all && echo default
-update: if [ -z $VAR(@) ]
+create: if [ -z $VAR(@) ]
then vyatta-vtysh -c "configure terminal" -c "router ospf" \
-c "passive-interface default";
else vyatta-vtysh -c "configure terminal" -c "router ospf" \
diff --git a/templates/protocols/ospfv3/area/node.tag/.filter-list/node.def b/templates/protocols/ospfv3/area/node.tag/.filter-list/node.def
index 358fa36c..791b3f5a 100644
--- a/templates/protocols/ospfv3/area/node.tag/.filter-list/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/.filter-list/node.def
@@ -1,3 +1,2 @@
-tag:
type: txt
-help: Set filter-list \ No newline at end of file
+help: Set filter-list
diff --git a/templates/protocols/ospfv3/area/node.tag/node.def b/templates/protocols/ospfv3/area/node.tag/node.def
deleted file mode 100644
index 03cac4e1..00000000
--- a/templates/protocols/ospfv3/area/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set OSPFv3 area parameters \ No newline at end of file
diff --git a/templates/protocols/rip/network-distance/node.tag/node.def b/templates/protocols/rip/network-distance/node.tag/node.def
deleted file mode 100644
index 7e9c8d59..00000000
--- a/templates/protocols/rip/network-distance/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set distance for a given network
diff --git a/templates/protocols/rip/passive-interface/node.def b/templates/protocols/rip/passive-interface/node.def
index 09039331..b3674afe 100644
--- a/templates/protocols/rip/passive-interface/node.def
+++ b/templates/protocols/rip/passive-interface/node.def
@@ -6,7 +6,7 @@ syntax:expression: exec " \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-update: if [ x$VAR(x) == xdefault ]
+create: if [ x$VAR(x) == xdefault ]
then vyatta-vtysh -c "configure terminal" -c "router rip" \
-c "passive-interface default"
else vyatta-vtysh -c "configure terminal" -c "router rip" \
diff --git a/templates/protocols/ripng/passive-interface/node.def b/templates/protocols/ripng/passive-interface/node.def
index 4fe2e16b..c3b1feed 100644
--- a/templates/protocols/ripng/passive-interface/node.def
+++ b/templates/protocols/ripng/passive-interface/node.def
@@ -8,7 +8,7 @@ syntax:expression: exec " \
exit 1; \
fi ; "
-update: if [ x$VAR(x) == xdefault ]; then
+create: if [ x$VAR(x) == xdefault ]; then
vyatta-vtysh -c "configure terminal" \
-c "router ripng" \
-c "passive-interface default";
diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/node.def
deleted file mode 100644
index 5bd7d7c7..00000000
--- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set next-hop interface
diff --git a/templates/protocols/static/interface-route/node.tag/node.def b/templates/protocols/static/interface-route/node.tag/node.def
deleted file mode 100644
index a628b753..00000000
--- a/templates/protocols/static/interface-route/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set IP network
diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/node.def
deleted file mode 100644
index 5bd7d7c7..00000000
--- a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Set next-hop interface
diff --git a/templates/protocols/static/interface-route6/node.tag/node.def b/templates/protocols/static/interface-route6/node.tag/node.def
deleted file mode 100644
index f5c3f487..00000000
--- a/templates/protocols/static/interface-route6/node.tag/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Set IP network
-
diff --git a/templates/protocols/static/route/node.tag/next-hop/node.tag/node.def b/templates/protocols/static/route/node.tag/next-hop/node.tag/node.def
deleted file mode 100644
index 08dff1a9..00000000
--- a/templates/protocols/static/route/node.tag/next-hop/node.tag/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Set next-hop router
-
diff --git a/templates/protocols/static/route/node.tag/node.def b/templates/protocols/static/route/node.tag/node.def
deleted file mode 100644
index f5c3f487..00000000
--- a/templates/protocols/static/route/node.tag/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Set IP network
-
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def
deleted file mode 100644
index 08dff1a9..00000000
--- a/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Set next-hop router
-
diff --git a/templates/protocols/static/route6/node.tag/node.def b/templates/protocols/static/route6/node.tag/node.def
deleted file mode 100644
index ecc2c12f..00000000
--- a/templates/protocols/static/route6/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Set IP network
-
-