DHCP

Claus, Ric claus at slac.stanford.edu
Thu Mar 21 23:19:07 UTC 2013


Thanks, Chris, that was a great help!  It triggered me to try tcpdump.  I see in its output exactly the buffer that my driver is claiming to have sent, along with complaints of 'oui Unknown'.

It smells like someone is adding sizeof(struct ether_header) to the mbuf payload pointer instead of subtracting it somewhere.

Surprising, but I guess no one uses DHCP...

	Ric


On Mar 21, 2013, at 3:33 PM, Chris Johns wrote:

> Claus, Ric wrote:
>> Is it known that DHCP works with the 4.11 git HEAD (well, of at least a few months ago)?  When I tried it using a board that does DHCP just fine under 4.10.2, it failed and timed out.  I forget the exact error message, but something about failing to get a response to a broadcast to 255.255.255.255.  I am currently debugging an ethernet driver for a new board using this same 4.11 snapshot, and am seeing the m_data of the mbuf dequeued from the network stack start with data that should be located 28 bytes into the buffer.  In other words, the header and the first 14 bytes of payload are missing.  The dumps are below (mbuf in local (arm) endian order, and header and payload in network endian order).  I'm sure I've still got plenty of things wrong, but this doesn't make sense to me.
> 
> I have not used DHCP on 4.11 for a while so I cannot help here.
> 
> What I do with these problems is use something like Wireshark to capture 
> the packet and then compare it with data you see in the buffer. If it 
> matches and is aligned ok it is something above the driver. If the data 
> is wrong it is often a driver problem.
> 
> Sniffing on networks is a little harder these days with switches unless 
> it is managed and you can configure it to output all packets on a 
> monitoring port.
> 
> Ah the days of inserting another T connector to sniff data.
> 
> Chris





More information about the devel mailing list