fix(firewall/iptables): shared mutex for both iptables and ip6tables

This commit is contained in:
Quentin McGaw
2026-03-23 14:09:26 +00:00
parent 57cf276d31
commit 086e3740f3
5 changed files with 7 additions and 18 deletions
-2
View File
@@ -11,9 +11,7 @@ import (
// returns a restore function that can be called to restore the saved rules.
func (c *Config) SaveAndRestore(ctx context.Context) (restore func(context.Context), err error) {
c.iptablesMutex.Lock()
c.ip6tablesMutex.Lock()
defer c.iptablesMutex.Unlock()
defer c.ip6tablesMutex.Unlock()
return c.saveAndRestore(ctx)
}