Add entry to ARP Table when a new socket is open

Hello,

I have a TCP/IP Server that uses FreeRTOS-Plus-TCP v4.1.0.
I want to disable the ARP broadcast because of some limitation of our PHY-switch.
This was done by replacing FreeRTOS_OutputARPRequest_Multi with an empty function.

This was not enough, because it looked like, in case the source does not send and ARP request before opening a socket (MAC already in the PC cache), xCheckRequiresARPResolution runs instead of just updating the ARP table and replying to open socket.

I don’t understand why in case of an incoming socket connection, xCheckRequiresARPResolution returns true.
The MAC address and the IP is already contained in the incoming packet and there is no need
to send an ARP request.

Removing xCheckRequiresARPResolution from prvProcessIPPacket fixed my issue, but I would like to clarify why it is needed.

Hi @zugo83,
Welcome to FreeRTOS community!

According to RFC 1122, Section 2.3.3, there is a requirement that states:

Address translation from Internet addresses to link-layer
addresses on Ethernet and IEEE 802 networks MUST be managed by
the Address Resolution Protocol (ARP).

This implies that our networking stack needs to execute the ARP flow for all packets received from the network. I understand that this requirement is in place for security reasons, as it helps ensure proper address resolution and prevents potential vulnerabilities.

Thank you.

3 Likes

Hi @ActoryOu ,

thank you very much for your clarification.