* Fix xDNS_IP_Preference to be IPv4 in the else case
* Fix UTs
* Fix DNS IP preference
* Uncrustify: triggered by comment
* Fix UTs
---------
Co-authored-by: GitHub Action <action@github.com>
* Fixes the Incoming IPv4 destination IP check when ipconfigETHERNET_DRIVER_FILTERS_PACKETS is disabled
* Add new API FreeRTOS_OutputARPRequest_Multi
* Fix UTs
* Fixes an issue which resulted in the response to a Neighbor Solicitation to be sent out the wrong interface.
Enforces that pxNetworkBuffer, pxNetworkBuffer->pxInterface, and pxNetworkBuffer->pxEndPoint are non-NULL for received packets.
* Adds proper loppback checks. Thanks @tony-josi-aws
* Update assert to checks
* Fix cbmc
* Remove repeated proof
* Fix unit tests
* Fix C90: Wno-declaration-after-statement
* Fix unit tests
* Uncrustify: triggered by comment
* Fix MISRA
* Fix build
* Uncrustify: triggered by comment
* Fix CBMC proofs
* Fix CBMC proof
* Uncrustify: triggered by comment
* Fix CBMC and UTs
* Uncrustify: triggered by comment
* Revert "Fix C90: Wno-declaration-after-statement"
This reverts commit b63cc50e61.
* Add comments as per review suggestions
* Uncrustify: triggered by comment
* Fix UTs
* Update with review suggestions
* Fix UTs and CBMC
* Fix CBMC
* Fix build
* Uncrustify: triggered by comment
* Remove unused comments
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: GitHub Action <action@github.com>
* Fixes an issue which resulted in the response to a Neighbor Solicitation to be sent out the wrong interface.
Modifies prvHandleEthernetPacket() to ensure prvProcessEthernetPacket() never gets called with a NULL pointer
Modifies prvProcessEthernetPacket() to cleanly handle pxNetworkBuffer->pxInterface and pxNetworkBuffer->pxEndPoint being NULL.
* Fix unit tests
* Fix unit tests
* Uncrustify: triggered by comment
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
* Remove xCheckLoopback function because we now have a loopback endpoint.
* Remove xCheckLoopback CBMC proof
* Remove xCheckLoopback UTs
---------
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
* Do not clear pxEndPoint in TCPReturnPacket()
* Don't release pxNetworkBuffer two times
* Repair unit tests
* Add full test coverage
* Uncrustify: triggered by comment
---------
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
* When responding to a mDNS/LLMNR/NBNS query, uses the endpoint selected during the reception of the query instead of searching for one.
* Removes prvFindEndPointOnNetMask( NetworkBufferDescriptor_t * pxNetworkBuffer ) which is no longer needed.
* Updates the DNS parser unit test. Thanks @htibosch
* Fix CBMC proof for prepareReplyDNSMessage
* Updates the DNS parser unit test. Thanks @htibosch
* Uncrustify: triggered by comment
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
* Update FreeRTOS_Routing.c
In line 855, the #if directive is checking for the "ipconfigHAS_PRINTF" conditional expression. Following this conditional check, line 872 should have a "FreeRTOS_printf" instead a "FreeRTOS_debug_printf".
It also fixes the "variable 'xRetNtopFrom' set but not used" compilation warning
* Uncrustify: triggered by comment.
* Update comment
* Uncrustify: triggered by comment.
* Update one more occurance
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
* Use GNU/Linux sort instead of MacOS Sort
* Add new common words to the cSpellWordList.txt
* Fix all spelling mistakes but the unit test name one
* Fix spelling mistake for test_xTCPCheckNewClient_Not_Found_Not_Accept
* Set ipBUFFER_PADDING to 14 bytes by default on 64 bit targets v2
* Added U suffix to some literal values like 0xFFFFFFFFU
* Corrected the offset/size table in the comments
* Changes ipBUFFER_PADDING checks after review Monika and Tony
---------
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Fix following MISRA issues :
MISRA Rule 8_5 : Symbol "FreeRTOS_inet_ntop6" is declared more than once.
MISRA Rule 8_9 : Symbol "FreeRTOS_in6addr_loopback" should be defined at block scope.
MISRA Rule 8_8 : missing static storage modifier for "prvCloseDHCPSocket" which has internal linkage.
MISRA Rule 9_1 : Using uninitialized value "xRemoteIP.xIs_IPv6" when calling "pxTCPSocketLookup".
MISRA Rule 9_1 : Using uninitialized value "pxAddress->sin_family" when calling "prvSocketBindAdd".
MISRA Rule 11_3 : A cast shall not be performed between two pointer of different object type.
MISRA Rule 12_1 : Missing parentheses on sub-expression of the operator.
MISRA Rule 14.4 : The condition expression 0 does not have an essentially boolean type
MISRA Rule 15_6 : The body of the "then" branch of the "if" statement is not a compound statement.
MISRA Rule 17_7 : The return value of a non-void function "memset" is unused.
MISRA Rule 20_5 : Using "#undef".
MISRA Rule 20_10 : Use of "#" or "##" preprocessor operator.
MISRA Rule 21_1 : Defining or undefining a reserved name "_static", which is an identifier or macro name beginning with an underscore.
MISRA Rule 21_15 : Calling function "memcmp" with incompatible types "void " and "uint8_t const ()[6]".
* Changes the ND cache full behavior: If the Neighbor Discovery cache ever gets full, trying to store a new entry will overwrite the oldest existing entry.
* Adds casting to avoid warnings
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* Give header files a uniform indentation
* Uncrustify: triggered by comment.
* A few more removals of /* ifndef ...*/
* After applying formattingChanges.patch
* Undo indent to avoid huge white space changes
* Undo more indent to avoid huge white space changes
* Undo two more indent to avoid huge white space changes
* Undo 15 more indent to avoid huge white space changes
* Undo 3 more indent to avoid huge white space changes
* Undo 4 more indent to avoid huge white space changes
* Undo 3 more indent to avoid huge white space changes
* It seems that core_cm55.h was not yet formatted
* More files in MPS3_AN552 were not yet formatted.
* And the last one
* Uncrustify: triggered by comment.
* Just a push to restart CI-checks
* Placed some extern "c" comments again
* Formatting fixes
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
* Fixes and issue with the SAME70 port where and error in gmac_dev_write() causes the counting xTXDescriptorSemaphore to not be returned and eventually exhausting it.
* fix formatting
* Allows release of the network buffer if gmac_dev_write() fails and the ero-copy driver is being used.
Thanks @htibosch
* Fix typo
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* STM32H7xx driver check result of HAL_ETH_Init v3
* One more change to networkInterface.c
* Updating FreeRTOS kernel submodule
* Once again commit kernel
---------
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* Disable DHCP timer when network goes down
* Don't stop checking the Network Timer
* Fix network down when using RA
* Revert "Don't stop checking the Network Timer"
This reverts commit f5d8d98856.
* Add vSetNotAllNetworksUp function
* Fix unit tests
* Update comments
* Store DHCPv4 socket locally for all endpoints
* Add vDHCPStop and vDHCPv6Stop functions
* Fix IP Utils tests
* Fix most of DHCP unit tests
* Fix formatting
* Change vSetNotAllNetworksUp into a more generic vSetAllNetworksUp
* Fix almost all of DHCP unit tests
* Fix formatting
* Add tests for vDHCPStop and vDHCPv6Stop functions
* Fix formatting
* Remove redundant MISRA comment
* Set all fields of xAddress when binding DHCP socket
* Fix unit test coverage of prvCreateDHCPSocket
* Fix DHCP CBMC memory proof
---------
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* Preparing library to use loopback device
* Repaired FreeRTOS_AddEndPoint() as well
* Minor changes for Doxygen
* Uncrustify: triggered by comment.
* Added IPv6.h and removed call to xIsIPv6Loopback
* Conditional compilation of xIPv6_GetIPType()
* Do not call xBadIPv4Loopback() when IPv4 is not enabled
* Repaired unit tests
* In FreeRTOS_AddEndPoint(), set next to NULL
* One more change in FreeRTOS_AddNetworkInterface()
* FreeRTOS_FillEndPoint: save pxNext before clearing entire endpoint struct
* Uncrustify: triggered by comment.
* Changes after review by Shub
* Changes after review by Shub, part 2
* Uncrustify: triggered by comment.
* Replace pxUDPPacket with pxIPacket in function prvAllowIPPacketIPv4()
* utest: replace xIPv6UnspecifiedAddress with FreeRTOS_in6addr_any
* Checked unit-tests and coverage
* ut: Repaired GetIPType loopback test
* Update test/unit-test/FreeRTOS_IPv6_ConfigDriverCheckChecksum/FreeRTOS_IPv6_ConfigDriverCheckChecksum_stubs.c
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* Update test/unit-test/FreeRTOS_IPv6/ut.cmake
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* Remove test for 'ipIPv4_FRAME_TYPE'
* Repairing tu again
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* IPv4/single: new function: FreeRTOS_get_tx_base
* Changed some code comments and repaired a typo.
* Attempt to repair utest
* Changes after CI checks
* utest: Added tests for get_tx_base
* Do not use const socket type in FreeRTOS_get_tx_base()
* Removed comments from cmake file ut
* Repaired UT
* Removed a nested if/endif couple
---------
Co-authored-by: Hein Tibosch <hein@htibosch.net>
* Fixes the TCP zero-copy functionality... looks like this somehow just got overlooked.
* Update unit tests
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
* Use GCC-compatible alignment specifier in TM4C NetworkInterface.c
Replace the CCS-only pragma with GCC attribute. Fixing this along with #1206 will make this file build without warnings on the ARM GNU toolchain.
The CCS compiler does support this attribute, see section 5.17.2 in: https://www.ti.com/lit/ug/spnu151w/spnu151w.pdf?ts=1695011722091
* Uncrustify: triggered by comment.
---------
Co-authored-by: GitHub Action <action@github.com>
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Add in bot formatting action