diff --git a/src/core/ipv4/ip4.c b/src/core/ipv4/ip4.c index 863df55da..ec519755d 100644 --- a/src/core/ipv4/ip4.c +++ b/src/core/ipv4/ip4.c @@ -1057,6 +1057,14 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); ip4_debug_print(p); +#ifdef LWIP_HOOK_IP4_OUTPUT + err_t err = ERR_OK; + if ((err = LWIP_HOOK_IP4_OUTPUT(p, src, dest, ttl, tos, proto, netif, ip_options, optlen)) != ERR_OK) + { + return err; + } +#endif + #if ENABLE_LOOPBACK #if ESP_LWIP && IP_NAPT /* doesn't work for external wifi interfaces */ diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index b1df7cfc3..253298933 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -1243,6 +1243,14 @@ ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, LWIP_DEBUGF(IP6_DEBUG, ("ip6_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); ip6_debug_print(p); +#ifdef LWIP_HOOK_IP6_OUTPUT + err_t err = ERR_OK; + if ((err = LWIP_HOOK_IP6_OUTPUT(p, src, dest, hl, tc, nexth, netif)) != ERR_OK) + { + return err; + } +#endif + #if ENABLE_LOOPBACK { int i;