Mwan3 masquerading broken after migration to 19.07 (& fix)


I'm writing here as I do not know how to contact the mwan3 author, and thinking it might help someone else in the future.

Having just reinstalled my Archer C7 from 18.06 to 19.07 and imported my previous configuration, I have found out that masquerading on one of the WAN interface didn't work anymore when mwan3 was started (but was working again properly as soon as I stopped mwan3).

Turns out that mwan3 wasn't adding the local routes to the IPv4 routing table for that specific WAN interface, there was only the default route (resulting in unmasqued reply packets being sent back to the WAN interface instead of the local interface(s)):

# ip route show table 1
default via dev eth0.2 metric 10 

=> missing local routes

# ip route show table 2
default via dev eth2 metric 20 dev br-lan proto static scope link metric 5 

=> good

I have traced the issue to /lib/mwan3/
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {

In my case, for some reason:

# uci get mwan3.@interface[0].family
uci: Entry not found
# uci get mwan3.@interface[1].family

The fix is thus straightforward, just add family ipv4 for that first mwan3 interface, and everything is fine again.
I guess IPv4 family used to be the default but is not anymore? (or maybe some previous mwan3 documentation/package did omit it?)