]> The Tcpdump Group git mirrors - tcpdump/commitdiff
PFLOG: Use nd_printjnp instead of %s conversion specifier
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 14 Dec 2020 21:15:48 +0000 (22:15 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 14 Dec 2020 21:15:48 +0000 (22:15 +0100)
print-pflog.c

index 4d53cea6335410053ace2b721ffae019c1410c5a..eb1b1766db004b1eee92cac81a4655eea924fd42 100644 (file)
@@ -100,11 +100,12 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr)
                ND_PRINT(".%u/", subrulenr);
        }
 
-       ND_PRINT("%s: %s %s on %s: ",
+       ND_PRINT("%s: %s %s on ",
            tok2str(pf_reasons, "unkn(%u)", GET_U_1(&hdr->reason)),
            tok2str(pf_actions, "unkn(%u)", GET_U_1(&hdr->action)),
-           tok2str(pf_directions, "unkn(%u)", GET_U_1(&hdr->dir)),
-           hdr->ifname);
+           tok2str(pf_directions, "unkn(%u)", GET_U_1(&hdr->dir)));
+       nd_printjnp(ndo, (const u_char*)hdr->ifname, IFNAMSIZ);
+       ND_PRINT(": ");
 }
 
 void