mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
ethernetif.c: update netif->input calls to check return value. In older ports, it's a good idea to upgrade them, even if before, there could be another problem (access to an uninitialized mailbox).
This commit is contained in:
parent
776c01e60b
commit
5fff6e7ff8
@ -71,6 +71,11 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-03-22 Frédéric Bernon
|
||||
* ethernetif.c: update netif->input calls to check return value. In older ports,
|
||||
it's a good idea to upgrade them, even if before, there could be another problem
|
||||
(access to an uninitialized mailbox).
|
||||
|
||||
2007-03-21 Simon Goldschmidt
|
||||
* sockets.c: fixed bug #5067 (essentialy a signed/unsigned warning fixed
|
||||
by casting to unsigned).
|
||||
|
@ -237,7 +237,11 @@ ethernetif_input(struct netif *netif)
|
||||
case ETHTYPE_IP:
|
||||
case ETHTYPE_ARP:
|
||||
/* full packet send to tcpip_thread to process */
|
||||
pnetif->input( p, pnetif);
|
||||
if (netif->input(p, netif)!=ERR_OK)
|
||||
{ LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_init: IP input error\n"));
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
#else /* ETHARP_TCPIP_ETHINPUT */
|
||||
@ -252,7 +256,11 @@ ethernetif_input(struct netif *netif)
|
||||
/* skip Ethernet header */
|
||||
pbuf_header(p, -sizeof(struct eth_hdr));
|
||||
/* pass to network layer */
|
||||
netif->input(p, netif);
|
||||
if (netif->input(p, netif)!=ERR_OK)
|
||||
{ LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_init: IP input error\n"));
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
/* ARP packet? */
|
||||
|
Loading…
Reference in New Issue
Block a user