Page MenuHomeFreeBSD

pfctl: delay label macro expansion until after rule optimisation
ClosedPublic

Authored by kp on Wed, Oct 13, 8:03 PM.

Details

Summary

We used to expand the $nr macro in labels into the rule number prior to
the optimisation step. This would occasionally produce incorrect rule
numbers in the labels.

Delay all macro expansion until after the optimisation step to ensure
that we expand the correct values.

MFC after: 1 week
Reported by: Özkan KIRIK <ozkan.kirik@gmail.com>

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.