From abfaa4bc4eea9a78189e03580ca24c84eb1b1369 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Fri, 10 Mar 2023 16:31:57 +0800 Subject: [PATCH] [net] fix LWIP_HOOK_IP4_ROUTE_SRC define --- components/net/lwip/port/lwipopts.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/net/lwip/port/lwipopts.h b/components/net/lwip/port/lwipopts.h index 795ddd06f6..c342977538 100644 --- a/components/net/lwip/port/lwipopts.h +++ b/components/net/lwip/port/lwipopts.h @@ -637,7 +637,11 @@ #endif #if RT_USING_LWIP_VER_NUM >= 0x20000 /* >= v2.0.0 */ +#if RT_USING_LWIP_VER_NUM < 0x20102 /* >= v2.0.0 && < v2.1.2 */ +#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) lwip_ip4_route_src(dest, src) +#else /* >= v2.1.2 */ #define LWIP_HOOK_IP4_ROUTE_SRC(src, dest) lwip_ip4_route_src(dest, src) +#endif #include "lwip/ip_addr.h" struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src); #endif /* RT_USING_LWIP_VER_NUM >= 0x20000 */