From: Stefan Schantl Date: Sun, 12 May 2013 17:04:26 +0000 (+0000) Subject: routing: Switch routes priority between ptp and ethernet devices. X-Git-Tag: 007~135^2~1 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fnetwork.git;a=commitdiff_plain;h=8fdc3a351e0fff6f0f2bf6975049e58cfaf6513a routing: Switch routes priority between ptp and ethernet devices. --- diff --git a/functions.routing b/functions.routing index a57fa36d..d60b7f76 100644 --- a/functions.routing +++ b/functions.routing @@ -53,15 +53,15 @@ function routing_default_update() { # Go on if the device is not there anymore. device_exists ${zone} || continue + # On other devices, we will use the gateway if we got one. + if isset gateway; then + routes="${routes} nexthop via ${gateway}" + # If we have got a Point-to-Point device, we will directly send all # packets into the pipe. - if device_is_ptp ${zone}; then + elif device_is_ptp ${zone}; then routes="${routes} dev ${zone}" - # On other devices, we will use the gateway if we got one. - elif isset gateway; then - routes="${routes} nexthop via ${gateway}" - # If none of the cases above apply, we cannot go on. else continue