HomeFreeBSD

pf: fix overly large copy in pf_rule_to_krule()

Description

pf: fix overly large copy in pf_rule_to_krule()

The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in
struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX).
Use the smaller of the sizes when copying.

Reported by: CheriBSD
MFC after: 1 week
Event: Kitchener-Waterloo Hackathon 202406

(cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98)

Details

Provenance
kpAuthored on Tue, Jun 4, 12:55 PM
Parents
rG357d111ef71f: pf tests: make ether:dummynet test a little more robust
Branches
Unknown
Tags
Unknown