From 9f957a5883cb4c5c99cefa71b42fc9d2d27d73e1 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 30 Dec 2017 17:45:01 -0800 Subject: [PATCH] Add EXTRACT_ calls. --- print-pflog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/print-pflog.c b/print-pflog.c index d0269af0..1f552e14 100644 --- a/print-pflog.c +++ b/print-pflog.c @@ -98,9 +98,9 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) ND_PRINT((ndo, "rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr)); ND_PRINT((ndo, "%s: %s %s on %s: ", - tok2str(pf_reasons, "unkn(%u)", hdr->reason), - tok2str(pf_actions, "unkn(%u)", hdr->action), - tok2str(pf_directions, "unkn(%u)", hdr->dir), + tok2str(pf_reasons, "unkn(%u)", EXTRACT_U_1(&hdr->reason)), + tok2str(pf_actions, "unkn(%u)", EXTRACT_U_1(&hdr->action)), + tok2str(pf_directions, "unkn(%u)", EXTRACT_U_1(&hdr->dir)), hdr->ifname)); } @@ -139,7 +139,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, pflog_print(ndo, hdr); /* skip to the real packet */ - af = hdr->af; + af = EXTRACT_U_1(&hdr->af); length -= hdrlen; caplen -= hdrlen; p += hdrlen; -- 2.39.5