Page MenuHomeFreeBSD

if_pflog: Limit the maximum unit via new KPI
ClosedPublic

Authored by zlei on Fri, Jun 28, 4:05 AM.
Tags
None
Referenced Files
F87519849: D45767.diff
Thu, Jul 4, 9:04 AM
F87468462: D45767.diff
Wed, Jul 3, 1:21 PM
Unknown Object (File)
Mon, Jul 1, 7:11 PM
Unknown Object (File)
Sun, Jun 30, 7:38 AM
Unknown Object (File)
Fri, Jun 28, 6:50 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 Skipped
Unit
Tests Skipped

Event Timeline

zlei requested review of this revision.EditedFri, Jun 28, 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.Fri, Jun 28, 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 ;)