From 35c731409350935eeed026a38e2984dafaa7c1bd Mon Sep 17 00:00:00 2001 From: Ari Suutari Date: Thu, 5 Sep 2013 20:37:01 +0300 Subject: [PATCH] Fix UDP statistics. --- core/net/uip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/net/uip.c b/core/net/uip.c index d4bba0e12..03a2c4f59 100644 --- a/core/net/uip.c +++ b/core/net/uip.c @@ -1136,6 +1136,7 @@ uip_process(uint8_t flag) } } UIP_LOG("udp: no matching connection found"); + UIP_STAT(++uip_stat.udp.drop); #if UIP_CONF_ICMP_DEST_UNREACH && !UIP_CONF_IPV6 /* Copy fields from packet header into payload of this ICMP packet. */ memcpy(&(ICMPBUF->payload[0]), ICMPBUF, UIP_IPH_LEN + 8); @@ -1169,6 +1170,7 @@ uip_process(uint8_t flag) #endif /* UIP_CONF_ICMP_DEST_UNREACH */ udp_found: + UIP_STAT(++uip_stat.udp.recv); uip_conn = NULL; uip_flags = UIP_NEWDATA; uip_sappdata = uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN]; @@ -1213,6 +1215,7 @@ uip_process(uint8_t flag) } #endif /* UIP_UDP_CHECKSUMS */ + UIP_STAT(++uip_stat.udp.sent); goto ip_send_nolen; #endif /* UIP_UDP */