mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-01 22:57:33 +02:00
see #2639 "support for vlan subinterfaces of bridge interfaces (e.g.
br0.5)". Currently fwbuilder can not generate script to configure vlan subinterfaces of bridge interfaces, however if user did not request this configuration script to be generated, compiler should not abort when it encounters this combination.
This commit is contained in:
parent
1da73349d5
commit
de1e3698a7
@ -1,5 +1,12 @@
|
||||
2011-08-11 Vadim Kurland <vadim@netcitadel.com>
|
||||
|
||||
* OSConfigurator_linux24_interfaces.cpp (validateInterfaces):
|
||||
see #2639 "support for vlan subinterfaces of bridge interfaces
|
||||
(e.g. br0.5)". Currently fwbuilder can not generate script to
|
||||
configure vlan subinterfaces of bridge interfaces, however if user
|
||||
did not request this configuration script to be generated,
|
||||
compiler should not abort when it encounters this combination.
|
||||
|
||||
* InterfaceEditorWidget.cpp (validateAddress): fixes #2641
|
||||
"newFirewall dialog does not accept ipv6 addresses with long
|
||||
prefixes". The dialog did not allow ipv6 addresses of inetrfaces
|
||||
|
||||
@ -529,6 +529,9 @@ string OSConfigurator_linux24::printDynamicAddressesConfigurationCommands()
|
||||
}
|
||||
|
||||
bool OSConfigurator_linux24::validateInterfaces()
|
||||
{
|
||||
FWOptions* options = fw->getOptionsObject();
|
||||
if ( options->getBool("configure_bridge_interfaces") )
|
||||
{
|
||||
/*
|
||||
* Per #315:
|
||||
@ -570,7 +573,10 @@ bool OSConfigurator_linux24::validateInterfaces()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (options->getBool("configure_vlan_interfaces"))
|
||||
{
|
||||
/*
|
||||
* Per #324:
|
||||
*
|
||||
@ -597,7 +603,7 @@ bool OSConfigurator_linux24::validateInterfaces()
|
||||
* both regular interfaces and vlans can be bridge ports. }
|
||||
*/
|
||||
|
||||
i = fw->findByType(Interface::TYPENAME);
|
||||
FWObjectTypedChildIterator i = fw->findByType(Interface::TYPENAME);
|
||||
for ( ; i!=i.end(); ++i )
|
||||
{
|
||||
Interface *iface = Interface::cast(*i);
|
||||
@ -606,25 +612,36 @@ bool OSConfigurator_linux24::validateInterfaces()
|
||||
for ( ; j!=j.end(); ++j )
|
||||
{
|
||||
Interface *subinterface = Interface::cast(*j);
|
||||
|
||||
if ( options->getBool("configure_bridge_interfaces") )
|
||||
{
|
||||
if (subinterface->getOptionsObject()->getStr("type") == "8021q" &&
|
||||
iface->getOptionsObject()->getStr("type") == "bridge")
|
||||
{
|
||||
QString err("Vlan subinterfaces of bridge interfaces are not supported. "
|
||||
QString err(
|
||||
"Vlan subinterfaces of bridge interfaces "
|
||||
"are not supported. "
|
||||
"Interface '%1', subinterface '%2'");
|
||||
abort(
|
||||
err.arg(iface->getName().c_str()).
|
||||
arg(subinterface->getName().c_str()).toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
if ( options->getBool("configure_bonding_interfaces"))
|
||||
{
|
||||
if (subinterface->getOptionsObject()->getStr("type") != "8021q" &&
|
||||
iface->getOptionsObject()->getStr("type") == "bonding")
|
||||
{
|
||||
QString subint_name = subinterface->getName().c_str();
|
||||
QRegExp vlan1("[a-zA-Z-]+\\d{1,}\\.\\d{1,}");
|
||||
QRegExp vlan2("vlan\\d{1,}");
|
||||
if (vlan1.indexIn(subint_name) != -1 || vlan1.indexIn(subint_name) != -1)
|
||||
if (vlan1.indexIn(subint_name) != -1 ||
|
||||
vlan1.indexIn(subint_name) != -1)
|
||||
{
|
||||
QString err("Vlan subinterfaces as slaves of bonding interfaces are not supported. "
|
||||
QString err(
|
||||
"Vlan subinterfaces as slaves of bonding interfaces "
|
||||
"are not supported. "
|
||||
"Interface '%1', subinterface '%2'");
|
||||
abort(
|
||||
err.arg(iface->getName().c_str()).
|
||||
@ -632,6 +649,9 @@ bool OSConfigurator_linux24::validateInterfaces()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
#
|
||||
# This is automatically generated file. DO NOT MODIFY !
|
||||
#
|
||||
# Firewall Builder fwb_ipt v5.0.0.3557
|
||||
# Firewall Builder fwb_ipt v5.0.1.3574
|
||||
#
|
||||
# Generated Wed Jul 6 17:48:03 2011 PDT by vadim
|
||||
# Generated Thu Aug 11 16:28:50 2011 PDT by vadim
|
||||
#
|
||||
# files: * rc.firewall.local /etc/rc.d//rc.firewall.local
|
||||
#
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user