WAN backend crashes when certain UCI options are not present
If wan6 interface does not have a ip6addr
, ip6prefix
or ip6gateway
option, Foris crashes when opening WAN tab:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/foris_controller_backends/uci/__init__.py", line 71, in get_option_named
res = res["data"][option]
KeyError: 'ip6prefix'
This is probably due to missing defaults along lines 76-78 of WAN backend.
Such configuration can make sense under certain conditions, like IPv6 on WAN but no delegated prefix (so no ip6prefix
) or using dynamic routing protocol and no ipv6gw
option. Similar issues could probably occur when using PPPoE without username
or password
or omitting IPv4 gateway
– I didn't test these, but it's obvious from the source code of WAN backend.