diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 1997-08-25 01:25:31 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 1997-08-25 01:25:31 +0000 |
| commit | 7022ea0a0cff055a8ef41f0c0ae6d73a95b37735 (patch) | |
| tree | 0c1a63bbf8db47c1d049395a34e1d57392f3fd98 | |
| parent | 9f81e05855a8e5e8f3cb5b40aeea67d291d5da20 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/icmp_var.h | 3 | ||||
| -rw-r--r-- | sys/netinet/ip_icmp.c | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index b208dc5e0130a..68d11876605fe 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: icmp_var.h,v 1.6 1997/02/22 09:41:24 peter Exp $ */ #ifndef _NETINET_ICMP_VAR_H_ @@ -54,6 +54,7 @@ struct icmpstat { u_long icps_badlen; /* calculated bound mismatch */ u_long icps_reflect; /* number of responses */ u_long icps_inhist[ICMP_MAXTYPE + 1]; + u_long icps_bmcastecho; /* b/mcast echo requests dropped */ }; /* diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 3166dd894937b..e948b4be5a5d5 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_icmp.c,v 1.26 1997/05/23 22:33:16 julian Exp $ + * $Id: ip_icmp.c,v 1.27 1997/08/02 14:32:53 bde Exp $ */ #include <sys/param.h> @@ -69,6 +69,10 @@ static int icmpmaskrepl = 0; SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, &icmpmaskrepl, 0, ""); +static int icmpbmcastecho = 1; +SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &icmpbmcastecho, + 0, ""); + #ifdef ICMPPRINTFS int icmpprintfs = 0; #endif @@ -370,6 +374,12 @@ icmp_input(m, hlen) break; case ICMP_ECHO: + if (!icmpbmcastecho + && (m->m_flags & (M_MCAST | M_BCAST)) != 0 + && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { + icmpstat.icps_bmcastecho++; + break; + } icp->icmp_type = ICMP_ECHOREPLY; goto reflect; |
