Page MenuHomeFreeBSD

pf: Apply kif flags to new group members
ClosedPublic

Authored by kp on Jan 18 2020, 8:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:10 AM
Unknown Object (File)
Aug 21 2023, 7:26 AM
Unknown Object (File)
Jul 10 2023, 1:20 AM
Unknown Object (File)
Jul 10 2023, 1:19 AM
Unknown Object (File)
Jul 10 2023, 1:19 AM
Unknown Object (File)
Jul 5 2023, 2:36 PM
Unknown Object (File)
Jun 17 2023, 6:28 PM
Unknown Object (File)
Jun 16 2023, 3:26 AM

Details

Summary

If we have a 'set skip on <ifgroup>' rule this flag it set on the group
kif, but must also be set on all members. pfctl does this when the rules
are set, but if groups are added afterwards we must also apply the flags
to the new member. If not, new group members will not be skipped until
the rules are reloaded.

Reported by: dvl@

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

glebius added a subscriber: glebius.
glebius added inline comments.
sys/netpfil/pf/pf_if.c
496 ↗(On Diff #66977)

The NULL check follows code in pf_test(), so let it be there. However, I believe NULL if_pf_kif isn't a normal situation, should be asserted to be not NULL as long as pf is loaded in kernel.

This comment is not blocking this revision. Just thinking that we should go over code and check whether all these checks need to be cleaned up.

This revision is now accepted and ready to land.Jan 20 2020, 10:34 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the review.

I'll experiment with changing those checks into assertions in my tree.