From 1f086d5f8fb910ab709907c027c6e39181ce6f42 Mon Sep 17 00:00:00 2001 From: nickgarlis Date: Tue, 1 Jul 2025 09:57:38 +0200 Subject: [PATCH] Add note about different behavior when using WithSockOptions --- conn.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 03e275d..c6c85bb 100644 --- a/conn.go +++ b/conn.go @@ -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...)