forked from Imagelibrary/lwip
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:
@@ -1057,6 +1057,8 @@ netif_poll(struct netif *netif)
|
||||
in_end->next = NULL;
|
||||
SYS_ARCH_UNPROTECT(lev);
|
||||
|
||||
in->if_idx = netif_get_index(netif);
|
||||
|
||||
LINK_STATS_INC(link.recv);
|
||||
MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len);
|
||||
MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts);
|
||||
|
||||
Reference in New Issue
Block a user