mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
loopif: set pbuf if_idx during poll
This sets the pbuf's if_idx during the loopif poll function (the equivalent netif input function). This was found during IP_PKTINFO development where p->if_idx is read and was uninitialized
This commit is contained in:
parent
1e02f9e88b
commit
f28c1c851b
@ -1057,6 +1057,8 @@ netif_poll(struct netif *netif)
|
|||||||
in_end->next = NULL;
|
in_end->next = NULL;
|
||||||
SYS_ARCH_UNPROTECT(lev);
|
SYS_ARCH_UNPROTECT(lev);
|
||||||
|
|
||||||
|
in->if_idx = netif_get_index(netif);
|
||||||
|
|
||||||
LINK_STATS_INC(link.recv);
|
LINK_STATS_INC(link.recv);
|
||||||
MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len);
|
MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len);
|
||||||
MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts);
|
MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user