summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJames Davidson <james@greycastle.net>2012-05-09 15:03:43 -0700
committerJames Davidson <james.davidson@vyatta.com>2012-05-16 10:05:11 -0700
commit94138d5b3c7bc6761ab30ddd6fe24a622d1f986b (patch)
treebea0635eb1ccf379ddb15d48b0ff7bef920bfe83 /templates
parent4ad53d24877117793962766c96d059ef4300151b (diff)
downloadvyatta-cfg-quagga-94138d5b3c7bc6761ab30ddd6fe24a622d1f986b.tar.gz
vyatta-cfg-quagga-94138d5b3c7bc6761ab30ddd6fe24a622d1f986b.zip
Warn user if both gateway-address and static default route are set
Fixes bug 7428.
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.def1
2 files changed, 5 insertions, 0 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 eb41b4e4..f5d5d417 100644
--- a/templates/protocols/static/route/node.tag/next-hop/node.def
+++ b/templates/protocols/static/route/node.tag/next-hop/node.def
@@ -31,3 +31,7 @@ end:
-c "no ip route $VAR(../@) $VAR(@)"
fi
fi
+ if [[ "$VAR(../@)" = "0.0.0.0/0" ]]
+ then
+ ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl warn
+ fi
diff --git a/templates/system/gateway-address/node.def b/templates/system/gateway-address/node.def
index 11f8e0f0..70419e26 100644
--- a/templates/system/gateway-address/node.def
+++ b/templates/system/gateway-address/node.def
@@ -11,3 +11,4 @@ update: oldgw=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \\$VAR\(/system/gateway
delete: if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl "$VAR(@)"
then vtysh -c "configure terminal" -c "no ip route 0.0.0.0/0 $VAR(@)"
fi
+end: ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl warn