diff options
author | Eric Norum <WENorum@lbl.gov> | 2005-05-24 00:36:35 +0000 |
---|---|---|
committer | Eric Norum <WENorum@lbl.gov> | 2005-05-24 00:36:35 +0000 |
commit | 2a94c854204833f8c3c3823091240cc4a60ce319 (patch) | |
tree | c9ab53e3c632b3a249908e4b6ae5a1fff54ac0eb /cpukit/libnetworking/netinet | |
parent | 2005-05-23 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-2a94c854204833f8c3c3823091240cc4a60ce319.tar.bz2 |
Add "ICMP panic avoided" diagnostic counter.
Diffstat (limited to 'cpukit/libnetworking/netinet')
-rw-r--r-- | cpukit/libnetworking/netinet/ip_icmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/libnetworking/netinet/ip_icmp.c b/cpukit/libnetworking/netinet/ip_icmp.c index 11e954dc9b..564a785b04 100644 --- a/cpukit/libnetworking/netinet/ip_icmp.c +++ b/cpukit/libnetworking/netinet/ip_icmp.c @@ -97,6 +97,7 @@ static void icmp_reflect(struct mbuf *); static void icmp_send(struct mbuf *, struct mbuf *); extern struct protosw inetsw[]; +unsigned int icmplenPanicAvoided; /* * Generate an error packet of type error @@ -139,8 +140,11 @@ icmp_error(n, type, code, dest, destifp) goto freeit; /* Don't send error in response to malicious packet */ icmplen = min(oiplen + 8, oip->ip_len); - if (icmplen < sizeof(struct ip)) + if (icmplen < sizeof(struct ip)) { + icmplenPanicAvoided++; goto freeit; + } + /* * First, formulate icmp message */ |