diff options
author | wollman <wollman@FreeBSD.org> | 1997-08-25 16:29:27 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-08-25 16:29:27 +0000 |
commit | 42f1df1cb984c7b4c337168c4effa65fa553fda8 (patch) | |
tree | 659ef92d479c2da47468957b28d9c88ab36a04fe /sys/netinet | |
parent | 6fb08f0a27db0fa17f1a8384f57982daec46b1fc (diff) | |
download | FreeBSD-src-42f1df1cb984c7b4c337168c4effa65fa553fda8.zip FreeBSD-src-42f1df1cb984c7b4c337168c4effa65fa553fda8.tar.gz |
ICMP Timestamp Request messages could have harbored the same sort of
problem as Echo Requests when broad/multicast. When multicast echo responses
are disabled, also do the same for timestamp responses.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/icmp_var.h | 3 | ||||
-rw-r--r-- | sys/netinet/ip_icmp.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index 68d1187..cb8af60 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: icmp_var.h,v 1.6 1997/02/22 09:41:24 peter Exp $ + * $Id: icmp_var.h,v 1.7 1997/08/25 01:25:29 wollman Exp $ */ #ifndef _NETINET_ICMP_VAR_H_ @@ -55,6 +55,7 @@ struct icmpstat { u_long icps_reflect; /* number of responses */ u_long icps_inhist[ICMP_MAXTYPE + 1]; u_long icps_bmcastecho; /* b/mcast echo requests dropped */ + u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */ }; /* diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index e948b4b..088bf58 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.27 1997/08/02 14:32:53 bde Exp $ + * $Id: ip_icmp.c,v 1.28 1997/08/25 01:25:31 wollman Exp $ */ #include <sys/param.h> @@ -384,6 +384,12 @@ icmp_input(m, hlen) goto reflect; case ICMP_TSTAMP: + if (!icmpbmcastecho + && (m->m_flags & (M_MCAST | M_BCAST)) != 0 + && IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { + icmpstat.icps_bmcasttstamp++; + break; + } if (icmplen < ICMP_TSLEN) { icmpstat.icps_badlen++; break; |