Fixes reception of multicast custom Ethernet frames #1177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When
ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES
is disabled, the stack relies oneConsiderFrameForProcessing()
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 changeseReturn
toeProcessBuffer
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
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.