2024-12-19 11:37 PM - last edited on 2024-12-20 02:50 AM by Andrew Neil
Hello everyone,
I'm using Netconn snmp over freertos on my project and I found an issue when using 2 netif interfaces. The problem is that when I receive udp messages, the response is always routed to the default netif despite having the LWIP_HOOK_IP4_ROUTE_SRC defined. Seems like in udp, the ip destination of the message received is not saved so we always answer on the default interface, that doesn't happen in tcp communication, where the message received destination ip is saved so in the LWIP_HOOK_IP4_ROUTE_SRC we can check that ip and select the correct the netif interface.
Does anybody know if there is any option that can be activated using a DEFINE or defining a function for that scope?
2024-12-25 08:27 AM
Hello @RPC ,
There are no defines that can be activated to solve such an issue as far as I recall, but my recommendation for you is to insure proper implementation of the callback functions and memory allocation for handling of multiple networking interfaces and also to make sure that you are working with the latest version of CubeFirmware which is known to solve a lot of issues related to the ethernet driver and containing the updated version of LWIP middleware it is also good to look for some reference implementation similar to your usecase to gain some time as well a good place to Seach for information about lwIP middleware is lwIP - A Lightweight TCP/IP stack - Summary [Savannah]
Regards