mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
Applied patches posted by Marc Boucher on lwip-users May 18th 2003.
This commit is contained in:
@@ -50,12 +50,13 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
struct icmp_echo_hdr *iecho;
|
||||
struct ip_hdr *iphdr;
|
||||
struct ip_addr tmpaddr;
|
||||
|
||||
|
||||
#ifdef ICMP_STATS
|
||||
++lwip_stats.icmp.recv;
|
||||
#endif /* ICMP_STATS */
|
||||
|
||||
/* TODO: check length before accessing payload! */
|
||||
|
||||
type = ((char *)p->payload)[0];
|
||||
|
||||
switch (type) {
|
||||
@@ -103,8 +104,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
iphdr->hoplim, IP_PROTO_ICMP, inp);
|
||||
break;
|
||||
default:
|
||||
DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type not supported.\n"));
|
||||
|
||||
DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %d not supported.\n", (int)type));
|
||||
#ifdef ICMP_STATS
|
||||
++lwip_stats.icmp.proterr;
|
||||
++lwip_stats.icmp.drop;
|
||||
|
||||
Reference in New Issue
Block a user