cancel
Showing results for 
Search instead for 
Did you mean: 

UDP routing not working as expected with 2 netif interfaces

RPC
Associate III

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?

1 REPLY 1
STea
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.