mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 00:53:37 +08:00
Work on bug #48824: ethernet.c extensions: Implement hook for unknown ethernet protocols
This commit is contained in:
@@ -208,10 +208,17 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
#endif /* LWIP_IPV6 */
|
||||
|
||||
default:
|
||||
ETHARP_STATS_INC(etharp.proterr);
|
||||
ETHARP_STATS_INC(etharp.drop);
|
||||
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
|
||||
goto free_and_return;
|
||||
#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
|
||||
if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) != ERR_OK) {
|
||||
#endif
|
||||
ETHARP_STATS_INC(etharp.proterr);
|
||||
ETHARP_STATS_INC(etharp.drop);
|
||||
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
|
||||
goto free_and_return;
|
||||
#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This means the pbuf is freed or consumed,
|
||||
|
||||
Reference in New Issue
Block a user