From 40ef28298287dc708532be8f253c57247572fea8 Mon Sep 17 00:00:00 2001 From: fbernon Date: Tue, 14 Aug 2007 18:01:34 +0000 Subject: [PATCH] Minor change: add in tcp_in.c in tcp_input(), some calls to handle error statistics (stats & snmp) --- src/core/tcp_in.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index ad727b1a..7318c962 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -115,6 +115,7 @@ tcp_input(struct pbuf *p, struct netif *inp) LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%"U16_F" bytes) discarded\n", p->tot_len)); TCP_STATS_INC(tcp.lenerr); TCP_STATS_INC(tcp.drop); + snmp_inc_tcpinerrs(); pbuf_free(p); return; } @@ -122,6 +123,8 @@ tcp_input(struct pbuf *p, struct netif *inp) /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(&(iphdr->dest), inp) || ip_addr_ismulticast(&(iphdr->dest))) { + TCP_STATS_INC(tcp.proterr); + TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); return; @@ -154,6 +157,7 @@ tcp_input(struct pbuf *p, struct netif *inp) LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet\n")); TCP_STATS_INC(tcp.lenerr); TCP_STATS_INC(tcp.drop); + snmp_inc_tcpinerrs(); pbuf_free(p); return; }