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)
Sun, Jan 5, 4:06 AM
Unknown Object (File)
Sat, Jan 4, 1:34 AM
Unknown Object (File)
Tue, Dec 31, 11:13 PM
Unknown Object (File)
Nov 27 2024, 7:33 PM
Unknown Object (File)
Nov 7 2024, 10:11 AM
Unknown Object (File)
Oct 25 2024, 12:33 PM
Unknown Object (File)
Oct 21 2024, 12:56 AM
Unknown Object (File)
Oct 21 2024, 12:56 AM

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 ;)