ipfilter: Obtain the interface name more efficiently

Rather than use a kmem read to determine the interface name used by a
nat_t structure through a pointer, nat_ipfs->netif->if_xname, obtain it
directly from nat_ifnames in the nat_t structure itself using the new
FORMAT_IF macro.

MFC after:	1 week
This commit is contained in:
Cy Schubert 2022-03-02 22:40:18 -08:00
parent 915395a280
commit ec793543fe

View File

@ -124,8 +124,8 @@ printactivenat(nat_t *nat, int opts, u_long ticks)
getsumd(nat->nat_sumd[1]),
nat->nat_pr[0], nat->nat_pr[1],
nat->nat_hv[0], nat->nat_hv[1], nat->nat_flags);
PRINTF("\tifp %s", getifname(nat->nat_ifps[0]));
PRINTF(",%s ", getifname(nat->nat_ifps[1]));
PRINTF("\tifp %s,%s ", FORMAT_IF(nat->nat_ifnames[0]),
FORMAT_IF(nat->nat_ifnames[1]));
#ifdef USE_QUAD_T
PRINTF("bytes %"PRIu64"/%"PRIu64" pkts %"PRIu64"/%"PRIu64"",
(unsigned long long)nat->nat_bytes[0],