]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add EXTRACT_ calls.
authorGuy Harris <[email protected]>
Sun, 31 Dec 2017 01:45:01 +0000 (17:45 -0800)
committerGuy Harris <[email protected]>
Sun, 31 Dec 2017 01:45:01 +0000 (17:45 -0800)
print-pflog.c

index d0269af04ab4fc5ac17675519529cca55cc86122..1f552e14bde68a297d398984445bc14e5a7a305b 100644 (file)
@@ -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: ",
                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));
 }
 
            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 */
                pflog_print(ndo, hdr);
 
        /* skip to the real packet */
-       af = hdr->af;
+       af = EXTRACT_U_1(&hdr->af);
        length -= hdrlen;
        caplen -= hdrlen;
        p += hdrlen;
        length -= hdrlen;
        caplen -= hdrlen;
        p += hdrlen;