HaaS doesn't log with the NCM/QMI (WAN protocols).
Generally problem is related to this: https://gitlab.labs.nic.cz/turris/foris/issues/115 and this https://github.com/openwrt/luci/pull/1683 .
Here I am going to describe more of a proposition of workaround for /etc/init.d/haas-proxy
to work with the NCM protocol out of the box. And make HaaS log on the website. It should work also for the QMI.
In general HaaS is trying to get the external IP from the interface wan by setting the variable WAN_IP
. But with the protocols mentioned there are two virtual interfaces created on connection wan_4
and wan_6
(for the IPv4 and IPv6 respectively). And haas-proxy should check first if the protocol used is not NCM or QMI and if so then look for the IP not on the wan
interface (since there is no IP there) but on the wan_4
or wan_6
virtual interface.
I knows some bash and if I will have time I am going to try to make a workaround for that. But skilled programmer should do that in a minute or two.
PROPOSITION OF SOLUTION:
- [1] The bug appears in 15 line of /etc/init.d/haas-proxy => WAN_IP returns nothing.
- [2] Should be one more function there checking the protocol.
- [3] And if it's protocol affected then changing the begining of the WAN_IP call to the
ubus call network.interface.wan_4
orubus call network.interface.wan_6
respectively. (I don't know how haas-proxy is handling IPv6)
MY WORKAROUND:
I just hardcoded network.interface.wan_4
in WAN_IP
but it might break if there will be any future update to haas-proxy.