summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.vyatta.com>2008-03-10 23:32:51 -0700
committerRobert Bays <rbays@moresby.vyatta.com>2008-03-10 23:32:51 -0700
commitf97e8ee8ac983a8f404e60f99693b6aed58837c9 (patch)
treef8dd2b5da6e92c7b5cc22285c1bf766170aa895a
parent456422fdc7c0cbe84ab837cba8f47270c0e75ad5 (diff)
downloadvyatta-cfg-quagga-f97e8ee8ac983a8f404e60f99693b6aed58837c9.tar.gz
vyatta-cfg-quagga-f97e8ee8ac983a8f404e60f99693b6aed58837c9.zip
fix for bug 2713
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl7
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/action/node.def3
2 files changed, 9 insertions, 1 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index 059ce1a5..bf29a56e 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -36,6 +36,13 @@ sub check_peer_name() {
print "malformed neighbor address $neighbor\n";
exit 1;
}
+
+ # Quagga treats the first byte as a potential IPv6 address
+ # so we can't use it as a peer group name. So let's check for it.
+ if (/^[A-Ga-g]{1,4}$/) {
+ print "malformed neighbor address $neighbor\n";
+ exit 1;
+ }
}
# Make sure we aren't deleteing a peer-group that has
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
index 1fcc4a8c..2c6557eb 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def
@@ -1,11 +1,12 @@
type: txt
help: Action to take on prefixes matching this rule
syntax:expression: $VAR(@) in "permit", "deny"; "route-map $VAR(../../@) $VAR(@) $VAR(../@) action: must be permit or deny"
+# we need to check if the action has been changed since the previous commit
update:expression: "/opt/vyatta/sbin/vyatta-policy.pl --check-routemap-action \"policy route-map $VAR(../../@) rule $VAR(../@) action\"; \
if [ \"$?\" -eq \"0\" ]; then \
${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(@) $VAR(../@)\"; \
else \
exit 1; \
fi ; "
-delete:expression: exec "sudo echo $VAR(@) > /tmp/delete-policy-route-map-$VAR(../../@)-rule-$VAR(../@)"
# note: delete is handled by parent 'rule' node because the action is required for a route-map in quagga
+delete:expression: exec "sudo echo $VAR(@) > /tmp/delete-policy-route-map-$VAR(../../@)-rule-$VAR(../@)"