ipfilter: Introduce the new FORMAT_IF macro

Interface names stored in the ipstate_t and ipnat_t structures can be
NULL. This occurs when an application, such as named, is running on the
firewall machine itself. For example an application, i.e. named, running
on the firewall itself will cause a state table display and NAT mapping
display to show a null ingress interface and its egress interface. This
is perfectly valid but confusing to human eyes. Rather than print
nothing, print "(null)".

MFC after:	1 week
This commit is contained in:
Cy Schubert 2022-03-02 22:21:59 -08:00
parent 70cb626635
commit 915395a280

View File

@ -103,6 +103,7 @@ typedef unsigned int u_32_t;
#define PRINTF (void)printf
#define FPRINTF (void)fprintf
#define FORMAT_IF(_a) (_a != NULL ? _a : "(null)")
struct ipopt_names {