pf: silence a runtime warning

Sometimes, for negated tables, pf can log 'pfr_update_stats: assertion failed'.
This warning does not clarify anything for users, so silence it, just as
OpenBSD has.

PR:		234874
MFC after:	1 week
This commit is contained in:
Kristof Provost 2019-01-15 08:59:51 +00:00
parent 305bb04ee4
commit 032dff662c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343041

View File

@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h>
#include <net/pfvar.h>
#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
#define ACCEPT_FLAGS(flags, oklist) \
do { \
if ((flags & ~(oklist)) & \
@ -1992,7 +1994,8 @@ pfr_update_stats(struct pfr_ktable *kt, struct pf_addr *a, sa_family_t af,
}
if ((ke == NULL || ke->pfrke_not) != notrule) {
if (op_pass != PFR_OP_PASS)
printf("pfr_update_stats: assertion failed.\n");
DPFPRINTF(PF_DEBUG_URGENT,
("pfr_update_stats: assertion failed.\n"));
op_pass = PFR_OP_XPASS;
}
kt->pfrkt_packets[dir_out][op_pass]++;