Page MenuHomeFreeBSD

pf: carry pfra_fback in the netlink pfr_addr encoding
ClosedPublic

Authored by rcm on Tue, Sep 29, 11:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 6, 10:57 PM
Unknown Object (File)
Tue, Oct 6, 8:43 PM
Unknown Object (File)
Tue, Oct 6, 4:09 AM
Unknown Object (File)
Mon, Oct 5, 10:48 PM
Unknown Object (File)
Mon, Oct 5, 4:32 AM
Unknown Object (File)
Mon, Oct 5, 1:50 AM
Unknown Object (File)
Sun, Oct 4, 8:57 PM
Unknown Object (File)
Sun, Oct 4, 11:43 AM

Details

Reviewers
kp
Summary

The netlink encoding of struct pfr_addr omits pfra_fback, so no
per-address feedback reaches userspace. In particular,
pfr_get_astats() marks entries of tables without counters with
PFR_FB_NOCOUNT, which pfctl uses to skip their counters, so
"pfctl -v -T show" prints zero counters for such tables.

Add PFR_A_FBACK, emit it from the kernel and decode it in libpfctl.

Add a regression test.

Fixes: 08f54dfca197 ("pf: convert DIOCRGETASTATS to netlink")
Sponsored by: Rubicon Communications, LLC ("Netgate")

Test Plan

Regression test included

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped