1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-20 22:10:04 +08:00
Commit Graph

21 Commits

Author SHA1 Message Date
tony-josi-aws
de3ffd4d69 [AUTO][RELEASE]: Update version number in source files 2024-12-11 04:15:08 +00:00
AlfaSegato
fa073ea341 do not let through unicast packets on inactive endpoints (#1186)
* do not let through unicast packets on inactive endpoints

* Modified test_FreeRTOS_FindEndPointOnIP_IPv4_ZeroAddressEndpoint()

* Fix unit tests

* Fix link verification check

---------

Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2024-09-30 11:28:50 +05:30
Holden
43f68ef001 Remove ipconfigHAS_ROUTING_STATISTICS (#1143)
* remove ipconfigHAS_ROUTING_STATISTICS

* Fix ARP CBMC failing

---------

Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: ActoryOu <ousc@amazon.com>
2024-07-31 10:14:20 +08:00
Emil Popov
503a6edb55 Fix for the incoming IPv4 destination IP check (#1086)
* Fixes the Incoming IPv4 destination IP check when ipconfigETHERNET_DRIVER_FILTERS_PACKETS is disabled

* Adds proper loppback checks. Thanks @tony-josi-aws

* Fix unit tests

* Uncrustify: triggered by comment

---------

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
2024-02-13 13:25:07 +05:30
Tony Josi
4471af64de Update loopback checks to discard bad loopback packets originating outside of the network (#1075)
* 009 Fail - Change dest add of loopback 127.0.0.1 addr

* Fix unit tests
2024-01-17 16:33:37 +05:30
Hein Tibosch
16a74c3ae9 Preparing library to use loopback device (#1020)
* 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>
2023-10-06 16:27:45 +05:30
Soren Ptak
eed294c0ec CI-CD Updates (#1014)
* 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
2023-09-05 14:31:24 -07:00
ActoryOu
f5ecc5f201 Fix MISRA violations Rule 1.1 for forward declaration (#1004)
* Fix MISRA things for forward declaration

* Formatting

* Fix return structure of prvAllowIPPacketIPv4 and comments.
2023-08-10 20:09:17 +08:00
Monika Singh
b23fa86ac4 Add and fix -Wconversion errors (#980)
* Fix Wconverstion

* Enable Wconversion warning

* Add fix

* Fix MISRA

* Fix coverity

* Add comments
2023-07-27 15:56:36 +05:30
Tony Josi
1f98752059 Adding IPv4/v6 build level separation: integration branch (#855)
* use matching endpoint instead of first endpoint

* update with @htibosch  latest changes

* fix formatting

* fix misra and spellings

* code clean up

* wip separation IP

* separation IP

* separation IP

* wip buils separation

* fixing unit tests

* fix unit tests

* fix formatting

* wip , next prvProcessNetworkDownEvent

* adding build separation to ip utils

* fix unit tests

* fix formatting

* update xCheckRequiresARPResolution

* update vARPAgeCache

* update vARPAgeCache

* misra checks

* fix formatting

* fix misra

* wip s/w: FreeRTOS_recvfrom

* wip sockets till prvSocketBindAdd

* adding  build separation to FreeRTOS_Sockets.c

* add build config support to FreeRTOS_inet_pton FreeRTOS_inet_ntop FreeRTOS_GetIPType

* adding build config support

* fix build  issues

* check misra

* minor fix

* fix unit tests

* fix unit tests build

* Uncrustify: triggered by comment

* fix formatting

* build separate FreeRTOS_TCP_IP.c

* build separate FreeRTOS_TCP_Reception.c

* misra fix

* build separate FreeRTOS_TCP_State_Handling.c

* build separate FreeRTOS_TCP_Transmission.c

* build separate FreeRTOS_TCP_Transmission.c fix build

* adding build separation for FreeRTOS_TCP_Utils.c and FreeRTOS_TCP_Transmission.c

* fix formatting

* UDP: Build Separation Changes

Changes in UDP files to support IPv4 and IPv6 Build Separation.

* fix IPv4 build issues post build sep merge

* IPv4 only build

* more - fix IPv4 build issues post build sep merge

* fix DHCP v4

* fix v6 build

* add v6 build checks

* separate v4v6 tcp files

* fix rebase conflicts

* fix formatting

* fix build when TCP disabled

* add more build checks

* adding more ipv4 flags to v4 specific files

* fix udp unit tests

* add build config build tests to CI

* fix formatting

* fix build checks yml

* DNS: Build Separation Changes

Changes for supporting IPv4 and IPv6 build separation in DNS.

* Routing: Build Separtion Changes

Changes for supporting IPv4 and IPv6 build separation in Routing.

* DNS build fix and rebase to latest changes

* fix formatting

* fix unit tests

* fix formatting

* fix MISRA

* updaating ARP functions to be available on all configs

* plus_tcp_demo_cli build config changes

* fix formatting, guard FreeRTOS_FillEndPoint inside ipconfigUSE_IPv4 check

* more build sepration changes to routing

* build separation plus_tcp_demo_cli.c

* fixing issues with routing, fix formatting

* adding pxFindEndpoint of plus_tcp_demo_cli inside ipconfigUSE_IPv6 != 0 check

* minor build fix

* moving usDNSType of endpoint struct out of ipconfigUSE_IPv6 check

* update code to use IP family while using socket APIs

* moving vSetMultiCastIPv4MacAddress to FreeRTOS_IPv4_Utils.c

* fix routing

* build DNS only if IPv4 is enabled

* fix review feedback

* fix build

* fix build

* fix formatting

* fix comment

* fix wrt reeview feedback

* fix unit tests

* cleanup FreeRTOS_MatchingEndpoint

* fix FreeRTOS_MatchingEndpoint to handle cusstom frames

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: shubnil <103672514+shubnil@users.noreply.github.com>
2023-05-09 19:48:59 +05:30
Monika Singh
a492abb0a8 Fix Additional Clang warnings
Corrects several warnings from Clang flags
for Clang 13.
2023-04-18 11:00:00 +00:00
Kody Stribrny
f15537303c Fix Clang warnings (#809)
Corrects several warnings from Clang flags
for Clang 13.

Inspired by @phelter's bug report
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/issues/558
2023-04-18 11:00:00 +00:00
ActoryOu
8e7a3fe5a1 Check packet length for IPv6. (#811)
* Check IPv6 packet length.

* Fix unused compile warnings.

* Move xCheckSizeFields to static function and fix unit test cases.

* Add minimum length check for IPv6 transport layer.
2023-04-06 17:09:24 +08:00
Monika Singh
9a955f27ac Add changes for Coverity fix (#729)
* Fix Coverity issues

* Fix Misra 4.4 violation:The comment resembles a code snippet

* Misra: Rule 10.4 violations

* Misra: Rule 11.8 violations

* Misra: Rule 12.1 violations

* Misra: Rule 8.2, 8.4, 8.5, and 8.9 violations

* Misra: Rule 5.3, 5.8, 21.1 and 21.2  violations

* Misra: Rule 5.7 violations

* Misra: Rule 8.3 violations

* Misra: Rule Reverse NULL violations

* Misra: Rule 10.3, 10.8 and 8.13 violations

* Fix 11.3 and suppress 11.4

* Misra: Rule 14.3, 15.7, 17.2 and 17.7 violations

* Misra: Rule 2.2 and 2.7 violation

* Misra: Rule 21.6, 8.5 and 8.13 violation

* Fix UT compilation

* Update comments

* Fix Spell checker

* Update snprintf
2023-02-28 12:55:20 +05:30
Tony Josi
0e9628796c Fixing doxygen comments (#728)
* updating doxygen config

* fixing doxygen comments

* adding IPv6 files and fixing comments

* fix doxygen cfg and file names in comments

* wip doxygen v6 docs

* adding doxygen comments

* include RA src file to doxgendocs generation

* fix spell check issues

* Uncrustify: triggered by comment.

* fix minor build issue

* fix spell check issues

* Uncrustify: triggered by comment

* fix trailing white space

* Dev integration hein.v8 (#738)

* Updating tcp utilities

* Some more change in dev_integration_hein.v8

* In FreeRTOS_DNS_Parser.c : use 'ipUDP_PAYLOAD_OFFSET_IPv4' in stead of 'ipIP_PAYLOAD_OFFSET'

* And a few more corrections

* Changes to WinPCap network interface, removed debugging code

* After applying uncrustify

* Oops, I forgot the push changes in include files.

* Now removing it, hopefully

---------

Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>

* Fix CBMC proofs for DNS (#718)

* Use CBMC XML output to enable VSCode debugger (#673)

Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.

Co-authored-by: Mark Tuttle <tuttle@acm.org>

* wip

* wip DNSgetHostByName

* wip DNSgetHostByName

* fixed cbmc proof for DNS_ReadNameField

* wip DNSgetHostByName_a_harness

* Fix CBMC prooff for DNSgetHostByName

* wip fix DNSgetHostByName_a CBMC proof

* fixed cbmc target func not called issue in DNSclear

* fixed cbmc target func not called issue in DNSlookup

* fix DNSgetHostByName_a CBMC proof

* update comments

* more asserts

* fixing formatting

* updating as per review comments

* fix dns after review comments

* adding more asserts

* adds more asserts

* minor fix

* fixing comments

* fixing comments

* fixing minor issue

* fixing DNS_ReadReply() signature

* making code more consistant

* adding more  asserts

* making code more consistent

---------

Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>

* Uncrustify: triggered by comment

* fixing formatting

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
2023-02-24 13:58:53 +05:30
shubnil
b87b70d9c7 Remove some left over IPv6 checks from IPv4 Flow (#723)
Remove a few left over IPv6 code from IPv4 UDP flow.
2023-02-16 17:43:17 +05:30
Monika Singh
7315e4b3ba Fix FreeRTOS_IP test cases (#666)
* Fix FreeRTOS_IP and FreeRTOS_IP_DiffConfig test cases
* Remove test_prvProcessIPEventsAndTimers_eNetworkDownEvent test Case
 - eNetworkDownEvent no longer support xNetworkUp variable, the network status
is kept in pxEndPoint->bits.bEndPointUp.
* Run Uncrustify.

Co-authored-by: GitHub Action <action@github.com>
2023-01-16 21:07:57 +05:30
kar-rahul-aws
bf32bf336e Demo changes for IPv4 Endpoint changes (#660)
* Update FreeRTOS_ARP.c
* Update FreeRTOS_UDP_IPv4.c
* Update FreeRTOS_TCP_Transmission_IPV4.c
* Update FreeRTOS_IP.c
* Update FreeRTOS_DHCP.c
* Update FreeRTOS_DNS.c
* Update NetworkInterface.c

Add Functions  To avoid scheduler suspension: xPacketBouncedBack and prvStreamBufferAdd
2023-01-10 19:27:49 +05:30
xuelix
f29870920d Fixing MISRA violation for FreeRTOS_IP*, FreeRTOS_DHCP* (#604)
* Fixing MISRA violation for FreeRTOS_IP*, FreeRTOS_DHCP*
* remove temp change
2022-12-14 09:19:08 +05:30
Monika Singh
1d3f1a4e88 Add endpoint changes to DHCP files (#593)
* DHCP.c changes and compilation fix
* Update end point changes
* Run uncrustify
2022-12-08 11:30:24 +05:30
Monika Singh
96643cedf1 Add IPv6 data path and endpoint changes to FreeRTOS_IP.c (#591)
* Add IPv6 data path and endpoint changes to FreeRTOS_IP.c
* Add FreeRTOS_IPv4.h and FreeRTOS_IPv6.h files.
* Fix compilation issues and run Uncrustify
2022-12-06 11:59:32 +05:30