]> git.ipfire.org Git - people/ms/network.git/commitdiff
routing: Switch routes priority between ptp and ethernet devices.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 12 May 2013 17:04:26 +0000 (17:04 +0000)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 12 May 2013 17:04:26 +0000 (17:04 +0000)
functions.routing

index a57fa36dfde31ef6d8b79be0a1c7d42a71fa30cd..d60b7f76a5fda6fbeeed8bc44346ac28a8d9f3ba 100644 (file)
@@ -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