mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 04:13:55 +00:00
Preparation for task #14369: Define ways to work with a netif having multiple ports
Let ethernet_input() fill in pbuf's if_idx (if not already set by driver or an L2 bridge)
This commit is contained in:
parent
0eeb10d4bb
commit
0a7734cf64
@ -94,6 +94,10 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
goto free_and_return;
|
||||
}
|
||||
|
||||
if (p->if_idx == NETIF_NO_INDEX) {
|
||||
p->if_idx = netif_get_index(netif);
|
||||
}
|
||||
|
||||
/* points to packet payload, which starts with an Ethernet header */
|
||||
ethhdr = (struct eth_hdr *)p->payload;
|
||||
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user