Skip to content

Commit 5ecff0b

Browse files
committed
pflog: Fix the minimum header length
The minimum header length (without padding) is: 61. Move it in pflog.h. [skip ci]
1 parent ece69f0 commit 5ecff0b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pflog.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ struct pfloghdr {
128128
nd_uint32_t rule_uid;
129129
nd_int32_t rule_pid;
130130
nd_uint8_t dir;
131+
/* Minimum header length (without padding): 61 */
132+
#define MIN_PFLOG_HDRLEN 61
131133
#if defined(__OpenBSD__)
132134
nd_uint8_t rewritten;
133135
nd_uint8_t naf;
@@ -146,6 +148,3 @@ struct pfloghdr {
146148
nd_uint16_t dport;
147149
#endif
148150
};
149-
150-
151-

print-pflog.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
142142
return;
143143
}
144144

145-
#define MIN_PFLOG_HDRLEN 45
146145
hdr = (const struct pfloghdr *)p;
147146
hdrlen = GET_U_1(hdr->length);
148147
if (hdrlen < MIN_PFLOG_HDRLEN) {

0 commit comments

Comments
 (0)