mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
Code beautification in LWIP_HOOK_UNKNOWN_ETH_PROTOCOL usage
This commit is contained in:
parent
0d5eea288c
commit
fc54556d80
@ -209,16 +209,14 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
|
#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
|
||||||
if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) != ERR_OK) {
|
if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) == ERR_OK) {
|
||||||
#endif
|
break;
|
||||||
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
|
#endif
|
||||||
|
ETHARP_STATS_INC(etharp.proterr);
|
||||||
|
ETHARP_STATS_INC(etharp.drop);
|
||||||
|
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
|
||||||
|
goto free_and_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This means the pbuf is freed or consumed,
|
/* This means the pbuf is freed or consumed,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user