mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-14 00:49:09 +02:00
see #2320 removing copies of cluster intrfaces
This commit is contained in:
@@ -141,6 +141,27 @@ QString CompilerDriver_iosacl::run(const std::string &cluster_id,
|
|||||||
QStringList(""), QStringList("fw"),
|
QStringList(""), QStringList("fw"),
|
||||||
QStringList(""));
|
QStringList(""));
|
||||||
|
|
||||||
|
/* Now that all checks are done, we can drop copies of cluster
|
||||||
|
* interfaces that were added to the firewall by
|
||||||
|
* CompilerDriver::populateClusterElements()
|
||||||
|
*/
|
||||||
|
list<FWObject*> all_interfaces = fw->getByTypeDeep(Interface::TYPENAME);
|
||||||
|
list<FWObject*> copies_of_cluster_interfaces;
|
||||||
|
for (std::list<FWObject*>::iterator i=all_interfaces.begin(); i!=all_interfaces.end(); ++i)
|
||||||
|
{
|
||||||
|
Interface *iface = Interface::cast(*i);
|
||||||
|
assert(iface);
|
||||||
|
|
||||||
|
if (iface->getOptionsObject()->getBool("cluster_interface"))
|
||||||
|
copies_of_cluster_interfaces.push_back(iface);
|
||||||
|
}
|
||||||
|
while (copies_of_cluster_interfaces.size())
|
||||||
|
{
|
||||||
|
fw->remove(copies_of_cluster_interfaces.front());
|
||||||
|
copies_of_cluster_interfaces.pop_front();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FWOptions* options = fw->getOptionsObject();
|
FWOptions* options = fw->getOptionsObject();
|
||||||
|
|
||||||
string fwvers = fw->getStr("version");
|
string fwvers = fw->getStr("version");
|
||||||
|
|||||||
Reference in New Issue
Block a user