Page MenuHomeFreeBSD

if_pflog: Limit the maximum unit via new KPI
ClosedPublic

Authored by zlei on Jun 28 2024, 4:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 17, 7:34 AM
Unknown Object (File)
Wed, Jul 16, 6:46 AM
Unknown Object (File)
Thu, Jul 3, 12:24 PM
Unknown Object (File)
Jun 14 2025, 1:52 AM
Unknown Object (File)
Jun 13 2025, 9:40 AM
Unknown Object (File)
Jun 12 2025, 9:35 AM
Unknown Object (File)
May 30 2025, 12:04 PM
Unknown Object (File)
May 28 2025, 3:03 PM

Details

Summary

The cloner has ability to limit maximum unit. Punish it to do that rather than roll our own.

No functional change intended.

MFC after: 1 week

Test Plan

Create up to PFLOGIFS_MAX ( 16 ) pflog interfaces, then it should fail to create additional interfaces.

# ifconfig pflog create
ifconfig: SIOCIFCREATE2 (pflog): No space left on device

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.EditedJun 28 2024, 4:05 AM

This depends on D45757 which introduce the new flag IFC_F_LIMITUNIT .

Punish it to do that rather

"Use it to do that" ?

I'm not going to argue about the pf code deserving punishment, but that might not be what you meant ;)

This revision is now accepted and ready to land.Jun 28 2024, 7:35 AM
In D45767#1043866, @kp wrote:

Punish it to do that rather

"Use it to do that" ?

I'm not going to argue about the pf code deserving punishment, but that might not be what you meant ;)

Ah, yes. I'd refer pflog_clone_create() as clone create function, and V_pflog_cloner as the cloner ;)