[En-Nut-Discussion] DHCP failure case

Joe Doubek jdoubek at control4.com
Fri Jan 21 02:53:43 CET 2005


Hello all, I'm seeing some strange DHCP behavior and wanted to ping the
group about it. This is under 3.9.2 of NutOS, though I saw the same
thing under 3.4.2. I make a call to DhcpIfConfig() with a timeout of 0
to force it to wait forever for configuration. I've noticed that DHCP
never can recover if the network cable isn't plugged in for a few
minutes after the DHCP thread is started. Once the cable is plugged back
in I see discovers go out and offers come back but dhcp never sees them.
I tracked this back to NutUdpInput() calling NutUdpFindSocket(), which
in turn looks for a matching port in udpSocketList and in this case it
never finds one. I have confirmed I'm still seeing the incoming offers
on port 68 (sp->so_local_port in NutUdpFindSocket() contains port 68).
I've also confirmed NutUdpDestroySocket() is never being called before
it gets in this state. It seems as though the DHCP socket port gets
wiped in udpSocketList if the network cable is unplugged for a few
minutes while the DHCP thread is running. If the device is plugged into
a hub but with no DHCP server running it doesn't appear to be a problem.

 

Joe Doubek | Embedded Systems Engineer
____________________________ 
Control4 
11734 South Election Road, Suite 200
Salt Lake City, UT 84020
United States
e. jdoubek at control4.com
w. www.control4.com
 

 




More information about the En-Nut-Discussion mailing list