I'm am observing an issue, or what I believe is an issue, with the NDK stack. When sending a packet to an IP address that is not on the same subnet, the NDK is not sending out an ARP to resolve the route for the default gateway. Here is my test case:
I configured my PC with IP address 192.168.1.1 and subnet mask 255.255.0.0. I configured my device (AM335x using the NDK stack) with IP address 192.168.0.10, subnet mask 255.255.255.0, and default gateway 192.168.0.1 (which does not exist). On the PC, I send a UDP/IP packet to my device. My device receives the packet and sends a UDP/IP packet back to the PC.
In the test case above, I was expecting that my device would detect that the PC's IP address is incompatible (not on the same subnet), and my device would have to route the packet through the default gateway. I was expecting my device to send an ARP to resolve the default gateway's MAC address, but I did not observe this behavior via Wireshark (using a managed switch with port mirroring to observe all traffic with my device).
This is my setup: CCS V5.4.0.00091, NDK V2.22.02.16, SYS/BIOS V6.35.04.50, and XDC V3.25.03.72. I know that these are older versions, but I did not find any documentation on the newer NDK release notes that address this issue.
My first thought was that since my device was able to receive a packet, it would assume that it could use the same route to send the packet. However, this is not the case with other Ethernet devices that I have tested. Other Ethernet devices will send an ARP to resolve the default gateway, if the original sender's IP address is incompatible.
I would appreciate any help on this issue.