From 3ce634b84e4d2cf49b63dc6e1e82dbf7e012daaf Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Fri, 19 Jan 2024 10:23:19 +0100 Subject: [PATCH] Add SetOption Signed-off-by: Florian Lehner --- conntrack.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conntrack.go b/conntrack.go index d3a5d01..31b7988 100644 --- a/conntrack.go +++ b/conntrack.go @@ -113,6 +113,11 @@ func (nfct *Nfct) Close() error { return nfct.Con.Close() } +// SetOption allows to enable or disable netlink socket options. +func (nfct *Nfct) SetOption(o netlink.ConnOption, enable bool) error { + return nfct.Con.SetOption(o, enable) +} + // Flush a conntrack subsystem func (nfct *Nfct) Flush(t Table, f Family) error { data := putExtraHeader(uint8(f), unix.NFNETLINK_V0, 0)