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
F110128202: D45767.diff
Fri, Feb 14, 12:12 AM
Unknown Object (File)
Sun, Feb 9, 7:47 AM
Unknown Object (File)
Jan 10 2025, 10:40 PM
Unknown Object (File)
Jan 10 2025, 6:33 PM
Unknown Object (File)
Jan 5 2025, 4:06 AM
Unknown Object (File)
Jan 4 2025, 1:34 AM
Unknown Object (File)
Dec 31 2024, 11:13 PM
Unknown Object (File)
Nov 27 2024, 7:33 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 ;)