pflog: Correctly initialise subrulenr
subrulenr is considered unset if it's set to -1, not if it's set to 1. See contrib/tcpdump/print-pflog.c pflog_print() for a user. This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0): rule 0..16777216(match) instead of the correct output of rule 0/0(match) PR: 214832 Submitted by: andywhite@gmail.com
This commit is contained in:
parent
1fab62b1e1
commit
c3e14afc18
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309563
@ -221,7 +221,7 @@ pflog_packet(struct pfi_kif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir,
|
||||
|
||||
if (am == NULL) {
|
||||
hdr.rulenr = htonl(rm->nr);
|
||||
hdr.subrulenr = 1;
|
||||
hdr.subrulenr = -1;
|
||||
} else {
|
||||
hdr.rulenr = htonl(am->nr);
|
||||
hdr.subrulenr = htonl(rm->nr);
|
||||
|
Loading…
Reference in New Issue
Block a user