I am doing DHCP relay POC. I have setup as following.
DHCP Client(VX-works) ----------- DHCP Relay----------- DHCP Server (VXworks)
In this setup, DHCP Client is sending the DICOVER packets, but relay agent was not receiving the packet. I looked into the code and I found that Berkeley Packet Filtering (BPF) is applied on the socket. DHCP Relay was simply dropping the packet and not forwarding it to the server.
In order to move further in my debugging, I removed the BPF filter and the checksum validation part from the code.
Now, DHCP Relay is forwarding the packet, but the packet is not what DHCP Server is expecting. DHCP Relay is changing the packet from broadcast to unicast correctly. The frame, the Ethernet header, the IP header, and the UDP header received at the server side are correct (I checked in Wireshark logs), but bootstrap protocol option fields are not correct.
I also captured the Wireshark logs at client side. Client is sending the DICOVER packet as expected.
If you need more information please comment.
Realy : ISC dhcrelay(4.3.1P1) Linux (3.14 kernel) based
Thanks in advance.
Edit: Below is the Hex Dump of a Single packet captured at DHCP Client side.
ff ff ff ff ff ff 00 20 61 1e 9e 14 08 00 45 00
01 1a 4f fe 40 00 20 11 09 d6 00 00 00 00 ff ff
ff ff 00 44 00 43 01 06 fd 9b 01 01 06 00 00 ae
af 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 20 61 1e 9e 14 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 02
4e 37 04 0f 06 03 01 ff