View | Details | Raw Unified | Return to bug 193689 | Differences between
and this patch

Collapse All | Expand All

(-)lib/libc/gen/sysctl.3 (+3 lines)
Lines 585-590 Link Here
585
.It Sy "Protocol	Variable	Type	Changeable"
585
.It Sy "Protocol	Variable	Type	Changeable"
586
.It "icmp	bmcastecho	integer	yes"
586
.It "icmp	bmcastecho	integer	yes"
587
.It "icmp	maskrepl	integer	yes"
587
.It "icmp	maskrepl	integer	yes"
588
.It "icmp	tstamprepl	integer	yes"
588
.It "ip	forwarding	integer	yes"
589
.It "ip	forwarding	integer	yes"
589
.It "ip	redirect	integer	yes"
590
.It "ip	redirect	integer	yes"
590
.It "ip	ttl	integer	yes"
591
.It "ip	ttl	integer	yes"
Lines 598-603 Link Here
598
to be answered.
599
to be answered.
599
.It Li icmp.maskrepl
600
.It Li icmp.maskrepl
600
Returns 1 if ICMP network mask requests are to be answered.
601
Returns 1 if ICMP network mask requests are to be answered.
602
.It Li icmp.tstamprepl
603
Returns 1 if ICMP timestamp requests are to be answered.
601
.It Li ip.forwarding
604
.It Li ip.forwarding
602
Returns 1 when IP forwarding is enabled for the host,
605
Returns 1 when IP forwarding is enabled for the host,
603
meaning that the host is acting as a router.
606
meaning that the host is acting as a router.
(-)sys/netinet/icmp_var.h (-1 / +2 lines)
Lines 82-88 Link Here
82
 */
82
 */
83
#define	ICMPCTL_MASKREPL	1	/* allow replies to netmask requests */
83
#define	ICMPCTL_MASKREPL	1	/* allow replies to netmask requests */
84
#define	ICMPCTL_STATS		2	/* statistics (read-only) */
84
#define	ICMPCTL_STATS		2	/* statistics (read-only) */
85
#define ICMPCTL_ICMPLIM		3
85
#define	ICMPCTL_ICMPLIM		3
86
#define	ICMPCTL_TSTAMPREL	4
86
87
87
#ifdef _KERNEL
88
#ifdef _KERNEL
88
SYSCTL_DECL(_net_inet_icmp);
89
SYSCTL_DECL(_net_inet_icmp);
(-)sys/netinet/ip_icmp.c (+7 lines)
Lines 149-154 Link Here
149
	&VNET_NAME(icmpbmcastecho), 0,
149
	&VNET_NAME(icmpbmcastecho), 0,
150
	"");
150
	"");
151
151
152
static VNET_DEFINE(int, icmptstamprepl) = 1;
153
#define	V_icmptstamprepl		VNET(icmptstamprepl)
154
SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW,
155
	&VNET_NAME(icmptstamprepl), 0, "Respond to ICMP Timestamp requests");
152
156
153
#ifdef ICMPPRINTFS
157
#ifdef ICMPPRINTFS
154
int	icmpprintfs = 0;
158
int	icmpprintfs = 0;
Lines 545-550 Link Here
545
			goto reflect;
549
			goto reflect;
546
550
547
	case ICMP_TSTAMP:
551
	case ICMP_TSTAMP:
552
		if (V_icmptstamprepl == 0)
553
			break;
554
548
		if (!V_icmpbmcastecho
555
		if (!V_icmpbmcastecho
549
		    && (m->m_flags & (M_MCAST | M_BCAST)) != 0) {
556
		    && (m->m_flags & (M_MCAST | M_BCAST)) != 0) {
550
			ICMPSTAT_INC(icps_bmcasttstamp);
557
			ICMPSTAT_INC(icps_bmcasttstamp);

Return to bug 193689