Modify

Opened 5 years ago

Last modified 4 years ago

#12298 new defect

Multiwan script adds improper 'device' in route statements when 'wan' connections use the same physical interface

Reported by: matthew.j.christ@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Attitude Adjustment 12.09 Beta
Keywords: multiwan Cc:

Description

Running OpenWrt Attitude Adjustment 12.09-beta on WZR-HP-G300NH.
Multiwan version 1.0.22-1

Configuration:

  • DSL modem connects to eth1.
  • I have two PPPoE connections over this interface, both to the same DSL provider.
  • Both WAN interfaces pull the same default gateway from the ISP.
  • network.wan=interface
  • network.wan.ifname=eth1
  • network.wan.proto=pppoe
  • network.wan.username=redacted
  • network.wan.password=redacted
  • network.wan2=interface
  • network.wan2.proto=pppoe
  • network.wan2.ifname=eth1
  • network.wan2.username=redacted2
  • network.wan2.password=redacted2

ip route

172.16.0.0/16 dev br-lan  proto kernel  scope link  src 172.16.0.1 
192.168.0.1 dev pppoe-wan  proto kernel  scope link  src 10.0.0.1 
192.168.0.1 dev pppoe-wan2  proto kernel  scope link  src 10.0.0.2
default via 192.168.0.1 dev pppoe-wan
default via 192.168.0.1 dev pppoe-wan2

After configuring and enabling multiwan, the default gateways looks like this:

ip route show table MWAN1 | grep default (pppoe-wan interface)

ip route show table MWAN2 | grep default (pppoe-wan2 interface)

default via 192.168.0.1 dev pppoe-wan  proto static  src 10.0.0.1
default via 192.168.0.1 dev pppoe-wan  proto static  src 10.0.0.2

Note how the 'dev' is identical on both tables.

Manually replacing the route in MWAN2 with the proper entry gets things routing properly over the correct interfaces:

ip route del default via 192.168.0.1 dev pppoe-wan proto static src 10.0.0.2 table MWAN2
ip route add default via 192.168.0.1 dev pppoe-wan2 proto static src 10.0.0.2 table MWAN2

Following is a diff that fixes it for me:
diff /usr/bin/multiwan /usr/bin/multiwan.broken


687c687
< 	    ip route add default via $gateway dev $ifname table $(($i + 170)) src $ipaddr proto static
---
> 	    ip route add default via $gateway table $(($i + 170)) src $ipaddr proto static

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.