]> The Tcpdump Group git mirrors - tcpdump/commitdiff
PFLOG: Try to fix previous commit
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 14 Dec 2020 21:02:01 +0000 (22:02 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 14 Dec 2020 21:05:57 +0000 (22:05 +0100)
The error was:
./print-pflog.c:99:20: error: passing 'char const[16]' to parameter
of type 'const u_char *' (aka 'const unsigned char *') converts
between pointers to integer types with different sign
[-Werror,-Wpointer-sign]
                nd_printjnp(ndo, hdr->ruleset, PFLOG_RULESET_NAME_SIZE);
                                 ^~~~~~~~~~~~
./netdissect.h:397:61: note: passing argument to parameter here
extern void nd_printjnp(netdissect_options *, const u_char *, u_int);
                                                            ^

print-pflog.c

index f9e758a01958f22aaaa0cca2d4e1dbb8df210413..4d53cea6335410053ace2b721ffae019c1410c5a 100644 (file)
@@ -96,7 +96,7 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr)
                ND_PRINT("rule %u/", rulenr);
        else {
                ND_PRINT("rule %u.", rulenr);
-               nd_printjnp(ndo, hdr->ruleset, PFLOG_RULESET_NAME_SIZE);
+               nd_printjnp(ndo, (const u_char*)hdr->ruleset, PFLOG_RULESET_NAME_SIZE);
                ND_PRINT(".%u/", subrulenr);
        }