Re: CVS (STABLE_0_3) works for Madwifi/Atheros, but starts too late



On Fri, 2005-05-13 at 12:33 -0400, Derek Atkins wrote:
> Quoting Dan Williams <dcbw redhat com>:
> 
> > In GDB, when you get here, can you do:
> > 
> > print dhcp_resp
> > print dhcp_resp.dhcp_msg
> > print dhcp_resp.dhcp_msg.options
> > 
> > And send along the results?  That should give me the actual packet the DHCP 
> > server passed back.
> 
> It looks like the DHCP client is _thinking_ that it got data, but really it
> didn't.  It also feels to me like it's a race condition, because it is much
> harder to reproduce since I installed the debuginfo package (whereas it
> happened really quick without it).

Ok, here's the issue (I think):

The variable we're checking for error conditions on is 'err'.  That gets
set to something in the peekfd() statement, which _could_ be
RET_DHCP_SUCCESS if the socket has got some data.  However, if that data
isn't a good DHCP message, we jump back up and try waiting for more
data.  But if we've reached the timeout point between when the peekfd()
returns RET_DHCP_SUCCESS and when we jump back up to the top, then we
break out of the loops in here and eventually out of the DHCP
transaction code.  But guess what?  We've not gotten a good DHCP reply,
and we're still returning RET_DHCP_SUCCESS.  Not good.

I'm working on a patch.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]