HomeFreeBSD

pfsync: Avoid zeroing the state export union

Description

pfsync: Avoid zeroing the state export union

pfsync_state_export() takes a pointer to a union that is in reality a
pointer to one of the three state formats (1301, 1400, 1500), and zeros
the union. The three formats do not have the same size, so zeroing is
wrong when the format isn't that which has the largest size.

Refactor a bit so that the zeroing happens at the layer where we know
which format we're dealing with.

Reported by: CHERI
Reviewed by: kp
MFC after: 1 week
Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001)
Differential Revision: https://reviews.freebsd.org/D54163

Details

Provenance
markjAuthored on Sun, Dec 14, 3:48 PM
Reviewer
kp
Differential Revision
D54163: pfsync: Avoid zeroing the state export union
Parents
rGc694122f3cfb: netmap: Let memory allocator parameters be settable via loader.conf
Branches
Unknown
Tags
Unknown