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)
Tue, Oct 22, 9:15 AM
Unknown Object (File)
Tue, Oct 22, 9:15 AM
Unknown Object (File)
Tue, Oct 22, 9:15 AM
Unknown Object (File)
Tue, Oct 22, 9:15 AM
Unknown Object (File)
Tue, Oct 22, 9:03 AM
Unknown Object (File)
Sep 30 2024, 11:01 AM
Unknown Object (File)
Sep 29 2024, 12:32 AM
Unknown Object (File)
Sep 24 2024, 4:38 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55986
Build 52875: 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.