Page MenuHomeFreeBSD

netlink: allow to override sb_max for netlink sockets
ClosedPublic

Authored by melifaro on Feb 9 2023, 9:40 PM.
Tags
None
Referenced Files
F102646724: D38472.diff
Fri, Nov 15, 7:24 AM
Unknown Object (File)
Sun, Oct 27, 12:01 AM
Unknown Object (File)
Oct 6 2024, 8:42 AM
Unknown Object (File)
Oct 6 2024, 6:38 AM
Unknown Object (File)
Oct 3 2024, 9:34 AM
Unknown Object (File)
Oct 3 2024, 12:01 AM
Unknown Object (File)
Oct 1 2024, 3:19 AM
Unknown Object (File)
Sep 27 2024, 2:25 PM
Subscribers

Details

Summary

Netlink sockets sometimes require larger buffers than other sockets - as, for example, full-view IPv4 dump sent via netlink may consume ~50 megabytes. The desired buffer may be bigger than the system maximum (sb_max).
FreeBSD HEAD has a mechanism for overriding protocol setsockopt() handler, which netlink uses to permit buffer reservations beyond sb_max. This behaviour is handy as it doesn't require system administrator to lift the limits of other sockets.
Stable/13 lack such muchanism, so a different approach has to be used.

This diff is a direct commit to stable/13 and it simply copies the current logic for checking if the larger buffer size should be pertmitted, from the Netlink.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49657
Build 46547: arc lint + arc unit