summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-06-05 14:46:06 +0000
committerMohit Mehta <mohit.mehta@vyatta.com>2008-06-05 14:46:06 +0000
commit71882f2f2c47a9df17ffdec69c6b9e8be3e4a237 (patch)
treeae312834e7221e1a86658cb39972133d53006512 /templates
parentff6c8c693d3f3e5b1702314087dfb2843448902c (diff)
downloadvyatta-cfg-quagga-71882f2f2c47a9df17ffdec69c6b9e8be3e4a237.tar.gz
vyatta-cfg-quagga-71882f2f2c47a9df17ffdec69c6b9e8be3e4a237.zip
Fix Bug 3269 system gateway-address conflicts with static default
- route is only deleted from route table if both gateway-address and the static route equivalent to setting a gateway-address are not set
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/static/route/node.tag/next-hop/node.def4
-rw-r--r--templates/system/gateway-address/node.def3
2 files changed, 5 insertions, 2 deletions
diff --git a/templates/protocols/static/route/node.tag/next-hop/node.def b/templates/protocols/static/route/node.tag/next-hop/node.def
index cfd4b923..1bb4b579 100644
--- a/templates/protocols/static/route/node.tag/next-hop/node.def
+++ b/templates/protocols/static/route/node.tag/next-hop/node.def
@@ -3,7 +3,9 @@ type: ipv4
help: Set the next-hop router
delete:expression: "touch /tmp/static.$PPID"
end:expression: "if [ -f \"/tmp/static.$PPID\" ]; then \
- ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $VAR(../@) $VAR(@)\" ; \
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \"$VAR(../@)\" \"$VAR(@)\"; then \
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $VAR(../@) $VAR(@)\" ; \
+ fi;
rm /tmp/static.$PPID; \
else \
if [ -n \"$VAR(./distance/@)\" ]; then \
diff --git a/templates/system/gateway-address/node.def b/templates/system/gateway-address/node.def
index 6a77c0a5..87416e8c 100644
--- a/templates/system/gateway-address/node.def
+++ b/templates/system/gateway-address/node.def
@@ -4,5 +4,6 @@ create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\"
update:expression: "oldgw=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl '$(/system/gateway-address/@)' ` && \
${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $oldgw \" && \
${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route 0.0.0.0/0 $VAR(@)\" "
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $VAR(@)\" "
+delete:expression: "if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \"$VAR(@)\"; then \
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $VAR(@)\"; fi"