Hi spock,
Thank you for looking into it, but I already know what's wrong. The above line is correct. It is actually line 70 in the mwan3_set_connected_iptables section which is incomplete. I just haven't had the time to fix it.
The section mwan3_set_iface_iptables is responsible for marking traffic origination from hosts directly connected to wan interface. That it matches bbras ip address is actually correct.
Edit:
The reason that you get the "uci: Entry not found" error is not directly related to mwan3, as you get these errors when you run "uci show" or "uci get". The other enabled error however might be a mwan3 error.
Edit2:
What do you get when you run "uci get -p /var/state network.wan.ifname"?
Thanks for looking it to this more
I also realized that the 'uci show' and 'uci get' errors have nothing to do with mwan3, I just found it odd that uci itself wouldn't list the ifname or ipaddress.
The following on the other hand reports "pppoe-wan" and it's respective ip address as it should.
uci get -p /var/state network.wan.ifname
uci get -p /var/state network.wan.ipaddr
As such I must admit that don't know the underlying code of openwrt/uci/ubus very well yet. :-)
About the following code, doesn't openwrt provide us with any better interface for retrieving such information, since it will break with pppoe, and possible other configurations too(?), just guessing here.
$($IP route | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}');
I was looking into ubus, but it quickly became a bit overwhelming, and maybe not suitable.. not to mention it might also need extra packages for parsing(?).
ubus -S call network.interface.wan status
Being christmas vacations and all I found it a good and fun opportunity to do some tinkering in the code and learn more things, to see what I can come up with. So I'll spend some time learning and trying to post a fix/patch for it if I manage.
Thanks for your time and a merry christmas & happy new years!
(Last edited by spock on 20 Dec 2014, 05:59)