From 42f1df1cb984c7b4c337168c4effa65fa553fda8 Mon Sep 17 00:00:00 2001 From: wollman Date: Mon, 25 Aug 1997 16:29:27 +0000 Subject: 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. --- sys/netinet/ip_icmp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/netinet/ip_icmp.c') 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 @@ -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; -- cgit v1.1