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 1b871496ea
commit c5b20a3b06
3 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ func (c *Config) runIP6tablesInstruction(ctx context.Context, instruction string
if c.ip6Tables == "" {
return nil
}
c.ip6tablesMutex.Lock() // only one ip6tables command at once
defer c.ip6tablesMutex.Unlock()
c.iptablesMutex.Lock() // only one ip6tables command at once
defer c.iptablesMutex.Unlock()
if isDeleteMatchInstruction(instruction) {
return deleteIPTablesRule(ctx, c.ip6Tables, instruction,