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,7 +27,9 @@ func InitNFCT() error {
// TeardownNFCT deinitializes the network filter conntrack library.
func TeardownNFCT() {
_ = nfct.Close()
if nfct != nil {
_ = nfct.Close()
}
}
// DeleteAllMarkedConnection deletes all marked entries from the conntrack table.