FreeBSD Bugzilla – Attachment 147384 Details for
Bug 193689
[PATCH] Add ICMP timestamp sysctl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ICMP timestamp sysctl patch
icmp_tstamprepl.patch (text/plain), 2.05 KB, created by
Anthony Cornehl
on 2014-09-16 19:03:12 UTC
(
hide
)
Description:
ICMP timestamp sysctl patch
Filename:
MIME Type:
Creator:
Anthony Cornehl
Created:
2014-09-16 19:03:12 UTC
Size:
2.05 KB
patch
obsolete
>diff --git c/lib/libc/gen/sysctl.3 w/lib/libc/gen/sysctl.3 >index 7d7b90a..4123113 100644 >--- c/lib/libc/gen/sysctl.3 >+++ w/lib/libc/gen/sysctl.3 >@@ -585,6 +585,7 @@ The currently defined protocols and names are: > .It Sy "Protocol Variable Type Changeable" > .It "icmp bmcastecho integer yes" > .It "icmp maskrepl integer yes" >+.It "icmp tstamprepl integer yes" > .It "ip forwarding integer yes" > .It "ip redirect integer yes" > .It "ip ttl integer yes" >@@ -598,6 +599,8 @@ Returns 1 if an ICMP echo request to a broadcast or multicast address is > to be answered. > .It Li icmp.maskrepl > Returns 1 if ICMP network mask requests are to be answered. >+.It Li icmp.tstamprepl >+Returns 1 if ICMP timestamp requests are to be answered. > .It Li ip.forwarding > Returns 1 when IP forwarding is enabled for the host, > meaning that the host is acting as a router. >diff --git c/sys/netinet/icmp_var.h w/sys/netinet/icmp_var.h >index d3e72bc..45473d4 100644 >--- c/sys/netinet/icmp_var.h >+++ w/sys/netinet/icmp_var.h >@@ -83,6 +83,7 @@ void kmod_icmpstat_inc(int statnum); > #define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */ > #define ICMPCTL_STATS 2 /* statistics (read-only) */ > #define ICMPCTL_ICMPLIM 3 >+#define ICMPCTL_TSTAMPREPL 4 > > #ifdef _KERNEL > SYSCTL_DECL(_net_inet_icmp); >diff --git c/sys/netinet/ip_icmp.c w/sys/netinet/ip_icmp.c >index 0073643..6d74113 100644 >--- c/sys/netinet/ip_icmp.c >+++ w/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 requests"); > > #ifdef ICMPPRINTFS > int icmpprintfs = 0; >@@ -545,6 +549,9 @@ 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193689
:
147384
|
147625
|
147626