Compare commits

..

2 Commits

Author SHA1 Message Date
Nick Garlis 1c481fb02a
Merge 8e29fbaa6e into 8a8ad2be81 2025-07-01 07:58:12 +00:00
nickgarlis 8e29fbaa6e Add note about different behavior when using WithSockOptions 2025-07-01 09:57:38 +02:00
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 // 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 { func WithSockOptions(opts ...SockOption) ConnOption {
return func(cc *Conn) { return func(cc *Conn) {
cc.sockOptions = append(cc.sockOptions, opts...) cc.sockOptions = append(cc.sockOptions, opts...)