mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 09:03:49 +08:00
Work on task #14780: Add debug helper asserts to ensure threading/locking requirements are met
Add LWIP_ASSERT_CORE_LOCKED() to several more places
This commit is contained in:
@@ -86,6 +86,8 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
u16_t next_hdr_offset = SIZEOF_ETH_HDR;
|
||||
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
|
||||
|
||||
LWIP_ASSERT_CORE_LOCKED();
|
||||
|
||||
if (p->len <= SIZEOF_ETH_HDR) {
|
||||
/* a packet with only an ethernet header (or less) is not valid for us */
|
||||
ETHARP_STATS_INC(etharp.proterr);
|
||||
@@ -271,6 +273,8 @@ ethernet_output(struct netif * netif, struct pbuf * p,
|
||||
struct eth_hdr *ethhdr;
|
||||
u16_t eth_type_be = lwip_htons(eth_type);
|
||||
|
||||
LWIP_ASSERT_CORE_LOCKED();
|
||||
|
||||
#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET)
|
||||
s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type);
|
||||
if (vlan_prio_vid >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user