Page MenuHomeFreeBSD

pfsync: Fix offset calculation
ClosedPublic

Authored by vegeta_tuxpowered.net on Feb 13 2024, 9:16 AM.
Tags
None
Referenced Files
F107005962: D43862.diff
Wed, Jan 8, 8:52 PM
Unknown Object (File)
Wed, Dec 11, 5:13 PM
Unknown Object (File)
Dec 9 2024, 2:03 AM
Unknown Object (File)
Dec 1 2024, 6:30 AM
Unknown Object (File)
Nov 21 2024, 5:10 PM
Unknown Object (File)
Nov 17 2024, 12:19 AM
Unknown Object (File)
Oct 22 2024, 9:15 AM
Unknown Object (File)
Oct 22 2024, 9:15 AM

Details

Summary

Even though message version is automatically recognized and the top of
the struct is identical for different versions, when iterating over
multiple messages proper message length must be used. That's the length
of an union member for given version, not of the union itself.

Test Plan

Checked logs with pf debug set to loud on my own setup of
FreeBSD 13.2 and 14.0 routers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55982
Build 52871: arc lint + arc unit

Event Timeline

pfsync: Fix offset calculation

Summary: Even though message version is automatically recognized and the top of
the struct is identical for different versions, when iterating over
multiple messages proper message length must be used. That's the length
of an union member for given version, not of the union itself.

Test Plan:
Checked logs with pf debug set to loud on my own setup of
FreeBSD 13.2 and 14.0 routers

Subscribers: imp, farrokhi, melifaro, glebius

Differential Revision: https://reviews.freebsd.org/D43862

This revision was not accepted when it landed; it landed in state Needs Review.Feb 15 2024, 12:55 PM
This revision was automatically updated to reflect the committed changes.