Page MenuHomeFreeBSD

libpfctl: grow request buffer on ENOSPC
ClosedPublic

Authored by kp on Apr 14 2022, 1:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 23, 6:29 PM
Unknown Object (File)
Sat, Jan 18, 7:59 AM
Unknown Object (File)
Nov 28 2024, 3:08 PM
Unknown Object (File)
Nov 24 2024, 3:15 AM
Unknown Object (File)
Nov 22 2024, 3:09 AM
Unknown Object (File)
Nov 17 2024, 3:32 AM
Unknown Object (File)
Nov 16 2024, 7:41 AM
Unknown Object (File)
Nov 12 2024, 8:37 PM
Subscribers

Details

Summary

When we issue a request to pf and expect a serialised nvlist as a reply
we have to supply a suitable buffer to the kernel.
The required size for this buffer is difficult to predict, and may be
(slightly) different from request to request.
If it's insufficient the kernel will return ENOSPC. Teach libpfctl to
catch this and send the request again with a larger buffer.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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