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 (-2 / +3 lines)
Lines 82-89 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_MAXID		4
86
#define	ICMPCTL_TSTAMPREL	4
87
#define	ICMPCTL_MAXID		5
87
88
88
#ifdef _KERNEL
89
#ifdef _KERNEL
89
SYSCTL_DECL(_net_inet_icmp);
90
SYSCTL_DECL(_net_inet_icmp);
(-)sys/netinet/ip_icmp.c (+7 lines)
Lines 148-153 Link Here
148
	&VNET_NAME(icmpbmcastecho), 0,
148
	&VNET_NAME(icmpbmcastecho), 0,
149
	"");
149
	"");
150
150
151
static VNET_DEFINE(int, icmptstamprepl) = 1;
152
#define	V_icmptstamprepl		VNET(icmptstamprepl)
153
SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW,
154
	&VNET_NAME(icmptstamprepl), 0, "Respond to ICMP Timestamp requests");
151
155
152
#ifdef ICMPPRINTFS
156
#ifdef ICMPPRINTFS
153
int	icmpprintfs = 0;
157
int	icmpprintfs = 0;
Lines 541-546 Link Here
541
			goto reflect;
545
			goto reflect;
542
546
543
	case ICMP_TSTAMP:
547
	case ICMP_TSTAMP:
548
		if (V_icmptstamprepl == 0)
549
			break;
550
544
		if (!V_icmpbmcastecho
551
		if (!V_icmpbmcastecho
545
		    && (m->m_flags & (M_MCAST | M_BCAST)) != 0) {
552
		    && (m->m_flags & (M_MCAST | M_BCAST)) != 0) {
546
			ICMPSTAT_INC(icps_bmcasttstamp);
553
			ICMPSTAT_INC(icps_bmcasttstamp);

Return to bug 193689