Skip to content

Commit

Permalink
Add SetOption
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <[email protected]>
  • Loading branch information
florianl committed Jan 19, 2024
1 parent d7db6e4 commit 3ce634b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3ce634b

Please sign in to comment.