Page MenuHomeFreeBSD

pf: carry pfra_fback in the netlink pfr_addr encoding
AcceptedPublic

Authored by rcm on Tue, Sep 29, 11:17 AM.
Tags
None
Referenced Files
F173990614: D60119.diff
Tue, Sep 29, 7:51 PM
F173981205: D60119.diff
Tue, Sep 29, 6:44 PM
F173972802: D60119.diff
Tue, Sep 29, 5:44 PM
F173955350: D60119.diff
Tue, Sep 29, 3:23 PM
F173955232: D60119.diff
Tue, Sep 29, 3:22 PM
F173952821: D60119.id187976.diff
Tue, Sep 29, 2:57 PM

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