Conversation
2 tasks
Add eConsiderPacketForProcessing and share IPv4/IPv6 admission rules with IP-task processing while preserving existing loopback behavior. Document the driver helper and cover framing, endpoint selection, and policy delegation in unit tests.
Filter completed RX descriptors after assigning their matching endpoint. Replace placeholder protocol checks, validate fixed header lengths before endpoint lookup, and avoid empty events when all received packets are rejected.
HTRamsey
force-pushed
the
feat/common-packet-filter
branch
from
September 8, 2026 23:53
8e7a641 to
3225c49
Compare
2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_PACKETSis enabled, network drivers must perform IP admission checks before handing packets to the IP task. The STM32 interface currently contains an unimplemented packet-filter hook.Add
eConsiderPacketForProcessing()to validate received descriptors and dispatch shared IPv4/IPv6 header and address checks. Extract those rules from the existing IP-task paths so fixes apply consistently to both filtering configurations, while preserving their existing loopback behavior. Checksum and transport processing remain in their existing paths.Update STM32 to call the helper after the completed descriptor has its received length and matching endpoint. Remove its placeholder protocol checks, require fixed protocol headers before endpoint lookup, and avoid posting an empty RX event when every packet in a batch is rejected.
Test Steps
FreeRTOS_IP_DiffConfig3,FreeRTOS_IPv4,FreeRTOS_IPv4_DiffConfig,FreeRTOS_IPv4_DiffConfig1,FreeRTOS_IPv6, andFreeRTOS_IPv6_ConfigDriverCheckChecksum.ENABLE_ALL,ENABLE_ALL_IPV4,ENABLE_ALL_IPV6,ENABLE_ALL_IPV4_TCP,ENABLE_ALL_IPV6_TCP,ENABLE_ALL_IPV4_IPV6,DISABLE_ALL, andDEFAULT_CONF, using the host loopback interface.git diff --checkpassed. STM32 hardware validation was not performed.Checklist:
Related Issue
No linked issue.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.