Skip TCP MTU checks when TCP is disabled - #1358
Open
HTRamsey wants to merge 1 commit into
Open
Conversation
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 TCP is disabled,
vPreCheckConfigs()still asserted that the configured MTU could hold a TCP header andipconfigTCP_MSS.FreeRTOSIPConfigDefaults.halso enforced the TCP MSS minimum and overflow checksunconditionally. These TCP-only constraints could reject otherwise valid UDP-only configurations.
This change:
ipconfigUSE_TCPguard.DISABLE_ALLbuild configuration to use the minimum valid 46-byte MTU, providing compile coverage for TCP-disabled, small-MTU configurations.TCP-enabled configurations retain the existing MSS and MTU protections.
Test Steps
freertos_plus_tcpcore library withFREERTOS_PLUS_TCP_TEST_CONFIGURATION=DISABLE_ALLandipconfigNETWORK_MTU=46.freertos_plus_tcpcore library withFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL_IPV4_TCP.ipconfigTCP_MSS=535still fails with the expected minimum-MSS configuration error.git diff --check.Checklist:
The
DISABLE_ALLbuild-combination configuration was updated to cover the TCP-disabled, minimum-MTU case.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.