HomeFreeBSD

pf: Fix timestamps and connection rate in source node export

Description

pf: Fix timestamps and connection rate in source node export

When copying struct pf_ksrc_node into a netlink message some fields
change their meaning. In kernel creation and expire fields are storing
number of seconds since boot.

Add conversion to number of seconds relative to moment of exporting the
source node via netlink, as this is what pfctl expects. Add conversion
of connection rate count.

Reviewed by: kp
Approved by: kp (mentor)
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D47321

Details

Provenance
vegeta_tuxpowered.netAuthored on Nov 21 2024, 2:23 PM
Reviewer
kp
Differential Revision
D47321: pf: Fix timestamps and connection rate in source node export
Parents
rGe8eb3096d8d1: pf: Fix missing connection rate for DIOCGETSRCNODES
Branches
Unknown
Tags
Unknown