Skip to content

Conversation

@tony-josi-aws
Copy link
Member

@tony-josi-aws tony-josi-aws commented Mar 10, 2025

Description

This PR updates the prvAllowIPPacketIPv4 to let the packets destined to endpoint's MAC (hardware) address when endpoint is not yet up to be processed, if the ipconfigETHERNET_DRIVER_FILTERS_PACKETS is disabled (default config option). This change is aligned with the RFC2131 requirement that:

   The TCP/IP software SHOULD accept and
   forward to the IP layer any IP packets delivered to the client's
   hardware address before the IP address is configured; DHCP servers
   and BOOTP relay agents may not be able to deliver DHCP messages to
   clients that cannot accept hardware unicast datagrams before the
   TCP/IP software is configured.

Since the initial DHCP DISCOVER message is sent without the broadcast flag (B: BROADCAST flag) enabled, DHCP servers respond with unicast OFFERs with destination MAC address as the endpoint's MAC address. This is the preferred behavior by the RFC.
Without this fix, the unicast DHCP OFFER messages are discarded, and the endpoint should wait till the DHCP timeout for the 2nd DHCP attempt, which is sent with the broadcast flag set to receive the OFFER/ACKmessage and complete DHCP process.

Test Steps

STM32 - FreeRTOS+TCP hardware demo tests.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tony-josi-aws tony-josi-aws requested a review from a team as a code owner March 10, 2025 14:58
@tony-josi-aws tony-josi-aws merged commit 3436954 into FreeRTOS:main Mar 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants