diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2014-10-01 18:07:34 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2014-10-01 18:07:34 +0000 |
| commit | 00cb6bef99ed57f2ef55a4e9ecdca4a7a21943e6 (patch) | |
| tree | a225bbef214ea087e2f12a739cf6e48774299f92 /sys | |
| parent | 98286ba5f48f8cbb80602ee21672025a6712d98c (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netinet/ip_icmp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 007364375834b..e5d32f03daea4 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -149,6 +149,10 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, ""); +static VNET_DEFINE(int, icmptstamprepl) = 1; +#define V_icmptstamprepl VNET(icmptstamprepl) +SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW, + &VNET_NAME(icmptstamprepl), 0, "Respond to ICMP Timestamp packets"); #ifdef ICMPPRINTFS int icmpprintfs = 0; @@ -545,6 +549,8 @@ icmp_input(struct mbuf **mp, int *offp, int proto) goto reflect; case ICMP_TSTAMP: + if (V_icmptstamprepl == 0) + break; if (!V_icmpbmcastecho && (m->m_flags & (M_MCAST | M_BCAST)) != 0) { ICMPSTAT_INC(icps_bmcasttstamp); |
