Page MenuHomeFreeBSD

pfsync: Fix offset calculation
ClosedPublic

Authored by vegeta_tuxpowered.net on Feb 13 2024, 9:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 25, 11:54 PM
Unknown Object (File)
May 3 2024, 3:39 PM
Unknown Object (File)
Apr 30 2024, 3:18 PM
Unknown Object (File)
Apr 26 2024, 8:07 PM
Unknown Object (File)
Apr 25 2024, 11:53 PM
Unknown Object (File)
Apr 14 2024, 5:39 PM
Unknown Object (File)
Apr 14 2024, 9:24 AM
Unknown Object (File)
Apr 11 2024, 9:54 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 Not Applicable
Unit
Tests Not Applicable

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.