Minor change: add in tcp_in.c in tcp_input(), some calls to handle error statistics (stats & snmp)

This commit is contained in:
fbernon 2007-08-14 18:01:34 +00:00
parent 9152d6671c
commit 40ef282982

View File

@ -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;
}