FreeRTOS / FreeRTOS-Plus-TCP

FreeRTOS-Plus-TCP library repository. +TCP files only. Submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
MIT License
146 stars 159 forks source link

Prevents FreeRTOS_OutputARPRequest() sending on all interfaces and endpoints #1104

Closed evpopov closed 7 months ago

evpopov commented 7 months ago

This PR is my proposal for how we should fix #1088 I decided to keep things simple and stay away from modifying API function parameters, or adding new macros/functions.

Let me know what you think.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

tony-josi-aws commented 7 months ago

@evpopov, thanks for creating this PR.

We have created another PR (#1105) also targeting issue #1088. Would love to have your thoughts on the same, as it takes a slightly different approach by creating a new API, FreeRTOS_OutputARPRequest_Multi which requires the interface to be targeted while sending the ARP messages while keeping the FreeRTOS_OutputARPRequest and making it use the new API internally.

FreeRTOS_OutputARPRequest_Multi takes the target interface as an argument so that finding the interface is deferred to the caller of the API, while FreeRTOS_OutputARPRequest is used when the required interface is not readily available from the caller's context and would require a call to FreeRTOS_FindEndPointOnNetMask. This could save redundant search for endpoints.

evpopov commented 7 months ago

Thanks. I commented in #1105. This PR is no longer needed.

tony-josi-aws commented 7 months ago

Thanks @evpopov

I commented in #1105.

I couldn't see any comments from you there.