mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
fixed bug #46093: Move IP6_ROUTE() hook to after LL processing
This commit is contained in:
parent
094cdf1c7b
commit
e0ab8c581d
@ -81,13 +81,6 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest)
|
|||||||
struct netif *netif;
|
struct netif *netif;
|
||||||
s8_t i;
|
s8_t i;
|
||||||
|
|
||||||
#ifdef LWIP_HOOK_IP6_ROUTE
|
|
||||||
netif = LWIP_HOOK_IP6_ROUTE(src, dest);
|
|
||||||
if (netif != NULL) {
|
|
||||||
return netif;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If single netif configuration, fast return. */
|
/* If single netif configuration, fast return. */
|
||||||
if ((netif_list != NULL) && (netif_list->next == NULL)) {
|
if ((netif_list != NULL) && (netif_list->next == NULL)) {
|
||||||
if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list)) {
|
if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list)) {
|
||||||
@ -126,6 +119,14 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest)
|
|||||||
return netif_default;
|
return netif_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we come here for non-link-local addresses */
|
||||||
|
#ifdef LWIP_HOOK_IP6_ROUTE
|
||||||
|
netif = LWIP_HOOK_IP6_ROUTE(src, dest);
|
||||||
|
if (netif != NULL) {
|
||||||
|
return netif;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* See if the destination subnet matches a configured address. */
|
/* See if the destination subnet matches a configured address. */
|
||||||
for (netif = netif_list; netif != NULL; netif = netif->next) {
|
for (netif = netif_list; netif != NULL; netif = netif->next) {
|
||||||
if (!netif_is_up(netif) || !netif_is_link_up(netif)) {
|
if (!netif_is_up(netif) || !netif_is_link_up(netif)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user