Track IP addresses in WifiStateMachine.
This makes WifiStateMachine listen for interface address changes. When an address changes, WifiStateMachine will update its LinkProperties to match reality and notify the system that the link configuration has changed. This allows wifi to keep track of IPv6 addresses as well (previously it only knew about the IPv4 address passed in by DHCP). IP addresses are obtained directly from the kernel and always match those configured on the interface, so we treat them as authoritative and ignore addresses passed in via DHCP (by the time DHCP passes them in we've already been notified by the kernel anyway). Since we now have multiple sources of link information (the kernel for addresses and DHCP for routes and DNS, plus various bits of static information), also move all the code that sets mLinkProperties into one place. This allows us to be clearer about who is authoritative for which parts of mLinkProperties. Bug: 10232006 Change-Id: I4f262342379ce7fed172b67a1d403e3cd34f4232
Loading
Please register or sign in to comment