From 639e3c9735e33272ff79f36f8d3612e93ed33fd3 Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Sat, 27 Apr 2024 09:09:01 +0200 Subject: [PATCH] add SetOption Signed-off-by: Florian Lehner --- nfqueue.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nfqueue.go b/nfqueue.go index 527c829..25f8f91 100644 --- a/nfqueue.go +++ b/nfqueue.go @@ -131,6 +131,11 @@ func (nfqueue *Nfqueue) SetVerdictBatch(id uint32, verdict int) error { return nfqueue.setVerdict(id, verdict, true, []byte{}) } +// SetOption allows to enable or disable netlink socket options. +func (nfqueue *Nfqueue) SetOption(o netlink.ConnOption, enable bool) error { + return nfqueue.Con.SetOption(o, enable) +} + // Register your own function as callback for a netfilter queue. // // The registered callback will stop receiving data if an error