Skip to content

ip_autoselector: fix invalid code that caused removal of LAN IP

Karel Koci requested to merge hotfix/ip_autoselector into master

This primarily fixes missing variable definition that caused removal of IP address on LAN and that way an router access breakage.

There are two additional changes to make ip_autoselector better behave. It should set IP address not the variant with network range (although that works as well). That means just using correct variable. It also now modifies DHCP setting so it provides correct DNS IP. Original implementation worked just because 192.168.1.1 address was directed to router but that works only if that is the only router on network. If there is more exact subnet with that IP then DNS would be routed there. That is wrong. We should send DNS to correct IP and not just rely on some IP redirect.

Fixes https://gitlab.nic.cz/turris/turris-os-packages/-/issues/664

Edited by Karel Koci

Merge request reports