build: Add ICMPPRINTFS as global option
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 16 Nov 2014 07:56:01 +0000 (15:56 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 16 Nov 2014 07:56:01 +0000 (15:56 +0800)
sys/conf/options
sys/config/LINT64
sys/netinet/ip_icmp.c

index 171e237..859dd22 100644 (file)
@@ -297,6 +297,7 @@ SLIP_IFF_OPTS               opt_slip.h
 TCPDEBUG
 TCP_SIGNATURE          opt_inet.h
 TCP_DROP_SYNFIN                opt_tcp_input.h
+ICMPPRINTFS
 
 XBONEHACK
 MBUF_STRESS_TEST       opt_mbuf_stress_test.h
index 7c466a3..d4a05af 100644 (file)
@@ -410,6 +410,8 @@ pseudo-device       stf                     #6to4 IPv6 over IPv4 encapsulation
 #
 # TCPDEBUG is undocumented.
 #
+# ICMPPRINTFS enables ICMP to do extra debug prints.
+#
 options        MROUTING                # Multicast routing
 options        PIM                     # Protocol Independent Multicast
 options        IPFIREWALL              #firewall
@@ -424,6 +426,7 @@ options     IPV6FIREWALL_DEFAULT_TO_ACCEPT
 options        IPDIVERT                #divert sockets
 options        IPSTEALTH               #support for stealth forwarding
 options        TCPDEBUG
+options                ICMPPRINTFS
 
 device         pf
 device         pflog
index 3b3b878..b2916e8 100644 (file)
@@ -135,7 +135,9 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW,
        "non-local packets");
 
 #ifdef ICMPPRINTFS
-int    icmpprintfs = 0;
+static int     icmpprintfs = 0;
+SYSCTL_INT(_net_inet_icmp, OID_AUTO, debug_prints, CTLFLAG_RW,
+       &icmpprintfs, 0, "extra ICMP debug prints");
 #endif
 
 static void    icmp_reflect (struct mbuf *);