HomeFreeBSD

ipfilter: Reliably print the interface name

Description

ipfilter: Reliably print the interface name

When printing the interface name from the ipstate_t struct the interface
name in is_ifp may not always be avaiable when reading it from kmem
(tested on FreeBSD and NetBSD). However the is_ifname (the interface
name character string) is almost always available -- it is not available
when the source of the packet is a process running on the firewall
itself. Rather than print both interface name strings, print only the
one.

(cherry picked from commit 93c1048a1360c3a0f1a6a9248916ef06c52b4504)

Details

Provenance
cyAuthored on Mar 3 2022, 6:43 AM
Parents
rG9b1b1dca3175: ipfilter: Obtain the interface name more efficiently
Branches
Unknown
Tags
Unknown