mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 03:53:33 +00:00
chore: clean up custom iptables chains on machine reset
This commit is contained in:
@@ -408,8 +408,9 @@ func (cc *clusterController) Cleanup() error {
|
||||
if err := cc.wgnet.Cleanup(); err != nil {
|
||||
errs = append(errs, fmt.Errorf("cleanup WireGuard network: %w", err))
|
||||
}
|
||||
// TODO: cleanup custom iptables chains. They're flushed when the machine is initialised again but it would
|
||||
// cleaner to delete them here.
|
||||
if err := firewall.CleanupIptablesChains(); err != nil {
|
||||
errs = append(errs, fmt.Errorf("cleanup iptables chains: %w", err))
|
||||
}
|
||||
|
||||
return errors.Join(errs...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user