From: Guy Harris Date: Sun, 31 Dec 2017 01:45:01 +0000 (-0800) Subject: Add EXTRACT_ calls. X-Git-Tag: tcpdump-4.99-bp~1534 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/9f957a5883cb4c5c99cefa71b42fc9d2d27d73e1 Add EXTRACT_ calls. --- 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;