Fix closing nf conntrack session when stopping during start

This commit is contained in:
Daniel 2023-04-13 16:29:22 +02:00
parent 72c59c0e52
commit 0aae9b4697

View file

@ -27,8 +27,10 @@ func InitNFCT() error {
// TeardownNFCT deinitializes the network filter conntrack library. // TeardownNFCT deinitializes the network filter conntrack library.
func TeardownNFCT() { func TeardownNFCT() {
if nfct != nil {
_ = nfct.Close() _ = nfct.Close()
} }
}
// DeleteAllMarkedConnection deletes all marked entries from the conntrack table. // DeleteAllMarkedConnection deletes all marked entries from the conntrack table.
func DeleteAllMarkedConnection() error { func DeleteAllMarkedConnection() error {