FreeBSD Bugzilla – Attachment 147625 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]
Update ICMP timestamp sysctl patch
pr-193689.diff (text/plain), 1.97 KB, created by
Pedro F. Giffuni
on 2014-09-23 20:43:47 UTC
(
hide
)
Description:
Update ICMP timestamp sysctl patch
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2014-09-23 20:43:47 UTC
Size:
1.97 KB
patch
obsolete
>Index: lib/libc/gen/sysctl.3 >=================================================================== >--- lib/libc/gen/sysctl.3 (revision 272033) >+++ lib/libc/gen/sysctl.3 (working copy) >@@ -585,6 +585,7 @@ > .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 @@ > 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. >Index: sys/netinet/icmp_var.h >=================================================================== >--- sys/netinet/icmp_var.h (revision 272033) >+++ sys/netinet/icmp_var.h (working copy) >@@ -82,8 +82,9 @@ > */ > #define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */ > #define ICMPCTL_STATS 2 /* statistics (read-only) */ >-#define ICMPCTL_ICMPLIM 3 >-#define ICMPCTL_MAXID 4 >+#define ICMPCTL_ICMPLIM 3 >+#define ICMPCTL_TSTAMPREL 4 >+#define ICMPCTL_MAXID 5 > > #ifdef _KERNEL > SYSCTL_DECL(_net_inet_icmp); >Index: sys/netinet/ip_icmp.c >=================================================================== >--- sys/netinet/ip_icmp.c (revision 272033) >+++ sys/netinet/ip_icmp.c (working copy) >@@ -148,6 +148,10 @@ > &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; >@@ -541,6 +545,9 @@ > 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