]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r339558: New sysctl: net.inet.icmp.error_keeptags
authoreugen <eugen@FreeBSD.org>
Tue, 20 Nov 2018 10:44:49 +0000 (10:44 +0000)
committereugen <eugen@FreeBSD.org>
Tue, 20 Nov 2018 10:44:49 +0000 (10:44 +0000)
commit9ce5414c51e25bcaac7827cebbdabcbdb694eb2e
tree56e41032b2045baa44b5f1802ba40db5100daee6
parenta1e236f6c4f29f04befe42250d20312424c12deb
MFC r339558: New sysctl: net.inet.icmp.error_keeptags

  Currently, icmp_error() function copies FIB number from original packet
  into generated ICMP response but not mbuf_tags(9) chain.
  This prevents us from easily matching ICMP responses corresponding
  to tagged original packets by means of packet filter such as ipfw(8).
  For example, ICMP "time-exceeded in-transit" packets usually generated
  in response to traceroute probes lose tags attached to original packets.

  This change adds new sysctl net.inet.icmp.error_keeptags
  that defaults to 0 to avoid extra overhead when this feature not needed.

  Set net.inet.icmp.error_keeptags=1 to make icmp_error() copy mbuf_tags
  from original packet to generated ICMP response.

PR: 215874
sys/netinet/ip_icmp.c