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)
Fri, Oct 25, 12:33 PM
Unknown Object (File)
Mon, Oct 21, 12:56 AM
Unknown Object (File)
Mon, Oct 21, 12:56 AM
Unknown Object (File)
Mon, Oct 21, 12:56 AM
Unknown Object (File)
Mon, Oct 21, 12:28 AM
Unknown Object (File)
Oct 2 2024, 5:46 PM
Unknown Object (File)
Sep 28 2024, 12:17 PM
Unknown Object (File)
Sep 27 2024, 8:58 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 ;)