The problem is not this code.  I found the problem.  It has to do with 
restarting the state machine if dhcpagent returns an error.

What was happening was that the DHCP address was "unusable" in the dhcp 
server, so that particular interface was cycling through the state 
machine.  "netstat -D" showed the interface in the "selecting" state 
during all this time.

We don't do anything to the states if dhcpagent times out.  Do we 
restart for all other errors?

Anurag




Anurag S. Maskey wrote:
> In ncu_ip.c:nwamd_handle_if_state_event(), what is the reasoning 
> behind the following lines of code?  Can't the NCU be in 
> offline*/initializing state?
>
>        case NWAM_STATE_OFFLINE_TO_ONLINE:
>                if (aux_state != NWAM_AUX_STATE_IF_WAITING_FOR_ADDR &&
>                    aux_state != NWAM_AUX_STATE_IF_DHCP_TIMED_OUT) {
>                        nlog(LOG_DEBUG, 
> "nwamd_ncu_handle_if_state_event: "
>                            "if %s is in invalid aux state %s for 
> IF_STATE "
>                            "events", event->event_object,
>                            nwam_aux_state_to_string(aux_state));
>                        nwamd_event_do_not_send(event);
>                        nwamd_object_release(ncu_obj);
>                        return;
>                }
>                break;
>
> The state machine cycles for a very very very long time before the NCU 
> comes up.  In my sparc test machine, one of the NCUs is cycling 
> through the above code for > 5 minutes and shows no signs of stopping.
>
> Anurag
>
> _______________________________________________
> nwam-dev mailing list
> nwam-dev at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/nwam-dev

Reply via email to