mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
chore: clean up custom iptables chains on machine reset
This commit is contained in:
1 parent
3ab708a437
commit
614212a24c
2 files changed
+35
-2
No files matched your search
@@ -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