Date: Thu, 16 Apr 2015 19:09:25 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281609 - in stable/10: share/man/man4 sys/netinet Message-ID: <201504161909.t3GJ9PpR024293@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Apr 16 19:09:25 2015 New Revision: 281609 URL: https://svnweb.freebsd.org/changeset/base/281609 Log: MFC r272378: Add net.inet.icmp.tstamprepl. PR: 193689 Modified: stable/10/share/man/man4/icmp.4 stable/10/sys/netinet/ip_icmp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/icmp.4 ============================================================================== --- stable/10/share/man/man4/icmp.4 Thu Apr 16 19:04:38 2015 (r281608) +++ stable/10/share/man/man4/icmp.4 Thu Apr 16 19:09:25 2015 (r281609) @@ -32,7 +32,7 @@ .\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 9, 2007 +.Dd September 30, 2014 .Dt ICMP 4 .Os .Sh NAME @@ -220,6 +220,10 @@ instead of the possibly different return Number of bytes from original packet to quote in ICMP reply. This number is internally enforced to be at least 8 bytes (per RFC792) and at most the maximal space left in the ICMP reply mbuf. +.It Va tstamprepl +.Pq Vt boolean +Enable/disable replies to ICMP Timestamp packets. +Defaults to true. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: Modified: stable/10/sys/netinet/ip_icmp.c ============================================================================== --- stable/10/sys/netinet/ip_icmp.c Thu Apr 16 19:04:38 2015 (r281608) +++ stable/10/sys/netinet/ip_icmp.c Thu Apr 16 19:09:25 2015 (r281609) @@ -148,6 +148,10 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO &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; @@ -541,6 +545,8 @@ icmp_input(struct mbuf *m, int off) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504161909.t3GJ9PpR024293>