|
Description
|
This logic in state_machine() attempts to handle the case where
a DHCP lease is finally obtained on a profile that is no longer
the current profile:
flags = get_ifflags(evif->if_name, evif->if_family);
if (!(flags & IFF_DHCPRUNNING) && !(flags & IFF_UP) &&
evllp->llp_ipv4src == IPV4SRC_DHCP) {
evif->if_timer_expire = 0;
if ((evif->if_lflags & IF_DHCPFAILED) != 0) {
evif->if_lflags &= ~IF_DHCPFAILED;
dhcp_restored = B_TRUE;
}
}
The intent of this code is to check if IFF_DHCPRUNING and IFF_UP are
both set, and if so conclude that a lease has been obtained. However,
the code actually checks that IFF_DHCPRUNNING and IFF_UP are *clear*,
which will never be true when a lease is obtained via DHCP. As such,
nwamd never switches back to the DHCP profile.
|