Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes reception of multicast custom Ethernet frames #1177

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

evpopov
Copy link
Contributor

@evpopov evpopov commented Aug 6, 2024

Description

When ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is disabled, the stack relies on eConsiderFrameForProcessing() to filter out frames.
If ipconfigPROCESS_CUSTOM_ETHERNET_FRAMES is enabled, the stack should receive unsupported Ethernet frames.
The current code does function properly for unicast and broadcast frames, however it filters out custom multicast frames. One example of such a frame is a PTP frame with a destination of 01:1B:19:00:00:00
This PR fixes the issue by explicitly allowing all unsupported frames when ipconfigPROCESS_CUSTOM_ETHERNET_FRAMES is enabled.

@HTRamsey, If I understand your intent correctly, you meant to to have the second filter stage of eConsiderFrameForProcessing() only drop packets. My PR changes eReturn to eProcessBuffer before breaking out of the filter which may be going against your original design.
The reason I took that approach is so to have a very simply path for these custom frames and avoid having to carve out a multicast exception further down in the function.

Test Steps

#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES    ipconfigDISABLE
#define ipconfigPROCESS_CUSTOM_ETHERNET_FRAMES        ipconfigENABLE

With those settings, multicast frames with an EtherTYPE other than ARP, IPv4, pr IPv6 get dropped instead of being passed to eApplicationProcessCustomFrameHook()

Related Issue

May have been caused by #1100 but I'm not sure.

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

…e parsed when ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES was disabled.
@evpopov evpopov requested a review from a team as a code owner August 6, 2024 15:19
@tony-josi-aws tony-josi-aws merged commit d701079 into FreeRTOS:main Aug 7, 2024
10 checks passed
@evpopov evpopov deleted the CustomFramesFix_PR branch August 14, 2024 12:03
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.

4 participants