mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
Add debug assert to my last commit and improve comment in opt.h
This commit is contained in:
parent
475d49440c
commit
aeb3834219
@ -2497,6 +2497,7 @@
|
||||
* LWIP_HOOK_VLAN_SET(netif, eth_hdr, vlan_hdr):
|
||||
* Hook can be used to set prio_vid field of vlan_hdr.
|
||||
* Called from ethernet_output() if VLAN support is enabled.
|
||||
* Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);
|
||||
* Arguments:
|
||||
* - netif: struct netif that the packet will be sent through
|
||||
* - p: struct pbuf packet to be sent
|
||||
|
@ -265,6 +265,8 @@ ethernet_output(struct netif* netif, struct pbuf* p,
|
||||
if (vlan_prio_vid >= 0) {
|
||||
struct eth_vlan_hdr* vlanhdr;
|
||||
|
||||
LWIP_ASSERT("prio_vid must be <= 0xFFFF", vlan_prio_vid <= 0xFFFF);
|
||||
|
||||
if (pbuf_header(p, SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) != 0) {
|
||||
goto pbuf_header_failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user