Skip to content

Commit

Permalink
pflog: log packet dropped by default rule with drop
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Oct 24, 2023
1 parent c61ca62 commit f155405
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/netpfil/pf/if_pflog.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ pflog_packet(struct pfi_kkif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir,
bzero(&hdr, sizeof(hdr));
hdr.length = PFLOG_REAL_HDRLEN;
hdr.af = af;
hdr.action = rm->action;
/* Default rule does not pass packets dropped for other reasons. */
hdr.action = (rm->nr == (u_int32_t)-1 && reason != PFRES_MATCH) ?
PF_DROP : rm->action;
hdr.reason = reason;
memcpy(hdr.ifname, kif->pfik_name, sizeof(hdr.ifname));

Expand Down

0 comments on commit f155405

Please sign in to comment.