diff options
author | Carl Byington <carl@five-ten-sg.com> | 2015-05-08 09:39:54 -0700 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-11-09 21:36:27 +0000 |
commit | 6284929fb9b7714a0da1098575422da56a1519a8 (patch) | |
tree | caf493cf31863c52d450b1434be2fedac8c62e35 /templates/protocols/static/route | |
parent | c1befdd98a8f2cc3245f6423828cf18f2ba2c07b (diff) | |
download | vyatta-cfg-quagga-6284929fb9b7714a0da1098575422da56a1519a8.tar.gz vyatta-cfg-quagga-6284929fb9b7714a0da1098575422da56a1519a8.zip |
avoid routing thru 127.0.0.1
Signed-off-by: Alex Harpin <development@landsofshadow.co.uk>
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/dhcp-interface/node.def | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/protocols/static/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/route/node.tag/dhcp-interface/node.def index 4942bf5f..3952233d 100644 --- a/templates/protocols/static/route/node.tag/dhcp-interface/node.def +++ b/templates/protocols/static/route/node.tag/dhcp-interface/node.def @@ -7,13 +7,17 @@ allowed: create: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $RIP" + if [ "$RIP" != "127.0.0.1" ]; then + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $RIP" + fi update: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $RIP" + if [ "$RIP" != "127.0.0.1" ]; then + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $RIP" + fi delete: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=delete RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) |