Validate the interface index and release endpoint addresses on the error paths

This commit is contained in:
Viktor Liu
2026-08-25 18:26:34 +02:00
parent 5b79cbc824
commit e9409ccbc1
4 changed files with 77 additions and 17 deletions
+5 -1
View File
@@ -528,7 +528,11 @@ const (
// not always available, so a lookup failure is not an error here.
func (m *Manager) cleanupNoTrackChain() error {
exists, err := m.ipv4Client.ChainExists(tableRaw, chainNameRaw)
if err != nil || !exists {
if err != nil {
log.Debugf("look up %s chain: %v", chainNameRaw, err)
return nil
}
if !exists {
return nil
}