Skip to content

[th/device-update-metered] device: update metered status when getting DHCP lease

Thomas Haller requested to merge th/device-update-metered into main

The metered status can depend on the DHCP lease, as we accept the ANDROID_METERED vendor option. That means, on a DHCP update we need to re-evaluate the metered flag.

This fixes a potential race, where IPv6 might succeed first and activation completes (with GUESS_NO metered flag). A subsequent DHCPv4 update requires to re-evaluate that decision.

Test: @connection_metered_guess_yes


This is supposed to help with test @connection_metered_guess_yes. See for example here.

Note that it doesn't fully fix the current version of connection_metered_guess_yes, because there is still a race that the metered state is not yet update-to-date the moment we are activated. We would either need to disable IPv6 or wait until IPv4 is ready.

Merge request reports