Adds support for multiple WAN interfaces that use identical default gateways.

Before the patch, the first interface to connect (first default
gateway in `ip route show`) was used as the default gateway for both
MWAN1 and MWAN2 routing tables.
After the patch, the proper interfaces are being used for MWAN1 and
MWAN2 routing tables.


Signed-off-by: Matthew J Christ <[email protected]>
---

Index: multiwan
===================================================================
--- multiwan    (revision 35802)
+++ multiwan    (working copy)
@@ -684,8 +684,8 @@
        done

        if [ "$gateway" != "x" -a "$ipaddr" != "x" -a "$ifname" != "x" ]; then
-           ip route add default via $gateway table $(($i + 170)) src
$ipaddr proto static
-           route add default gw $gateway > /dev/null 2>&1
+           ip route add default via $gateway dev $ifname table $(($i +
170)) src $ipaddr proto static
+           route add default gw $gateway dev $ifname > /dev/null 2>&1
        fi
     done
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to