Add note about different behavior when using WithSockOptions

This commit is contained in:
nickgarlis 2025-07-01 09:57:38 +02:00
parent f2d2e1cbc2
commit 1f086d5f8f
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,9 @@ func WithTestDial(f nltest.Func) ConnOption {
}
// WithSockOptions sets the specified socket options when creating a new netlink
// connection.
// connection. Note that when using WithSockOptions, you are responsible for
// providing a large-enough read and write buffer, whereas normally, the
// nftables package automatically enlarges the buffers as needed.
func WithSockOptions(opts ...SockOption) ConnOption {
return func(cc *Conn) {
cc.sockOptions = append(cc.sockOptions, opts...)