From 71882f2f2c47a9df17ffdec69c6b9e8be3e4a237 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 5 Jun 2008 14:46:06 +0000 Subject: 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 --- templates/protocols/static/route/node.tag/next-hop/node.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'templates/protocols/static') 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 \ -- cgit v1.2.3