diff --git a/libnetwork/iptables/iptables.go b/libnetwork/iptables/iptables.go index ce681f0ca6..b91e0d3e7d 100644 --- a/libnetwork/iptables/iptables.go +++ b/libnetwork/iptables/iptables.go @@ -275,14 +275,14 @@ func (iptable IPTable) ProgramChain(c *ChainInfo, bridgeName string, hairpinMode // RemoveExistingChain removes existing chain from the table. func (iptable IPTable) RemoveExistingChain(name string, table Table) error { + if table == "" { + table = Filter + } c := &ChainInfo{ Name: name, Table: table, IPTable: iptable, } - if string(c.Table) == "" { - c.Table = Filter - } return c.Remove() }