remove unused code

This commit is contained in:
Quentin McGaw
2026-08-07 11:25:12 +00:00
parent ba5942a929
commit 2697b4422f
-16
View File
@@ -39,22 +39,6 @@ func (c *Config) Version(ctx context.Context) (string, error) {
return "iptables " + words[1], nil return "iptables " + words[1], nil
} }
func (c *Config) runIptablesInstructions(ctx context.Context, instructions []string) error {
c.iptablesMutex.Lock()
defer c.iptablesMutex.Unlock()
restore, err := c.saveAndRestoreIPv4(ctx)
if err != nil {
return err
}
err = c.runIptablesInstructionsNoSave(ctx, instructions)
if err != nil {
restore(ctx)
}
return err
}
func (c *Config) runIptablesInstructionsNoSave(ctx context.Context, instructions []string) error { func (c *Config) runIptablesInstructionsNoSave(ctx context.Context, instructions []string) error {
for _, instruction := range instructions { for _, instruction := range instructions {
if err := c.runIptablesInstructionNoSave(ctx, instruction); err != nil { if err := c.runIptablesInstructionNoSave(ctx, instruction); err != nil {