2014年5月19日 星期一

Wi-Fi extender can not get DHCP IP issue

This issue happened while doing a Atheros Wi-Fi extender project. It looks like a layer 2 issue and QCM FAE also indicates that we need to implement a NAT-like table but for layer 2 to trick the AP that these are packets from one of its clients instead of a remote device. But we captured packets from TL-WR710N using omnipeak and found that there's no NAT trick done by it and the only difference is that whatever packets forwarded by it for DHCP packets are set with broadcast flag in bootp data. The flag is set from 0 to 0x8000. But doing the same modification in our QCM product does not make things better. It even affects the original working DHCP behavior in our QCM product itself. After setting the bootp broadcast, even the QCM product itself can not get IP offer.
Guess what ? The direction is correct, and the solution is right, but lacks of something vital... Yes, a wrong UDP checksum ! Whatever you made a change to a payload, be sure to check the payload correctness using tools like Wireshark or Ethereal. Omnipeak won't do the trick for you though. Using csum_tcpudp_magic() and csum_partial() to recalculate the checksum and stuff it back to the UDP checksum. Bang ! Everything works !

沒有留言:

張貼留言