summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1997-08-25 16:29:27 +0000
committerwollman <wollman@FreeBSD.org>1997-08-25 16:29:27 +0000
commit42f1df1cb984c7b4c337168c4effa65fa553fda8 (patch)
tree659ef92d479c2da47468957b28d9c88ab36a04fe /sys/netinet/ip_icmp.c
parent6fb08f0a27db0fa17f1a8384f57982daec46b1fc (diff)
downloadFreeBSD-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/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c8
1 files changed, 7 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud