dhcpv4_assign: rework the assignment logic