Created attachment 163185 [details] 10.2-stable unified diff for /usr/src/sys/netinet/ip_icmp.c Currently it only possible to follow IPv4 ICMP handling in/of the kernel by recompiling the kernel and adding a define for "ICMPPRINTFS" to enable kernel console messages for ICMP handling in /usr/src/sys/netinet/ip_icmp.c. The attached patch converts this into a sysctl variable "net.inet.icmp.log_icmps" to enable/disable debugging output without recompilation. As an add-on, the FIB number is displayed for rx'd/tx'd ICMP packets.
(In reply to Hellmuth Michaelis from comment #0) > Currently it only possible to follow IPv4 ICMP handling in/of the kernel by > recompiling the kernel and adding a define for "ICMPPRINTFS" to enable > kernel console messages for ICMP handling in /usr/src/sys/netinet/ip_icmp.c. You can get the most of these printfs using dtrace fbt probes. To get more, I prefer add ICMP_PROBE() dtrace probe, similar to that we have for IP, UDP and TCP.