mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
tcpip.c: Fix TCPIP_MSG_INPKT processing: now, tcpip_input can be used for any kind of packets. These packets are considered like Ethernet packets (payload pointing to ethhdr) if the netif got the NETIF_FLAG_ETHARP flag. Else, packets are considered like IP packets (payload pointing to iphdr).
This commit is contained in:
parent
d7da390ae9
commit
7182fb8fb0
@ -312,6 +312,12 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-08-28 Frédéric Bernon
|
||||
* tcpip.c: Fix TCPIP_MSG_INPKT processing: now, tcpip_input can be used for any
|
||||
kind of packets. These packets are considered like Ethernet packets (payload
|
||||
pointing to ethhdr) if the netif got the NETIF_FLAG_ETHARP flag. Else, packets
|
||||
are considered like IP packets (payload pointing to iphdr).
|
||||
|
||||
2007-08-27 Frédéric Bernon
|
||||
* api.h, api_lib.c, api_msg.c: First fix for "bug #20900 : Potential crash error
|
||||
problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state
|
||||
|
@ -313,13 +313,17 @@ tcpip_thread(void *arg)
|
||||
msg->msg.apimsg->function(&(msg->msg.apimsg->msg));
|
||||
break;
|
||||
|
||||
#if LWIP_ARP
|
||||
case TCPIP_MSG_INPKT:
|
||||
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg));
|
||||
ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);
|
||||
#if LWIP_ARP
|
||||
if (msg->msg.inp.netif->flags & NETIF_FLAG_ETHARP) {
|
||||
ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);
|
||||
} else
|
||||
#endif /* LWIP_ARP */
|
||||
{ ip_input(msg->msg.inp.p, msg->msg.inp.netif);
|
||||
}
|
||||
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
|
||||
break;
|
||||
#endif /* LWIP_ARP */
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
case TCPIP_MSG_NETIFAPI:
|
||||
@ -354,7 +358,8 @@ tcpip_thread(void *arg)
|
||||
/**
|
||||
* Pass a received packet to tcpip_thread for input processing
|
||||
*
|
||||
* @param p the received packet, p->payload pointing to the Ethernet header
|
||||
* @param p the received packet, p->payload pointing to the Ethernet header or
|
||||
* to an IP header (if netif doesn't got NETIF_FLAG_ETHARP flag)
|
||||
* @param netif the network interface on which the packet was received
|
||||
*/
|
||||
err_t
|
||||
|
Loading…
Reference in New Issue
Block a user