mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-18 17:27:20 +01:00
* platforms.cpp (setInterfaceTypes): see #2224 "FreeBSD - Bridge
interfaces with the name vlan<xx> dont show as Bridge Port Interfaces". This actually applies to all OS where we support vlan and bridge interfaces. Fwbuilder GUI should allow the user to set subinterface type to both "ethernet" and "vlan" when its parent interface has type "bridge". Setting subinterface type to "ethernet" makes it bridge port, while setting the type to "vlan" signals policy compiler that it should generate code to configure real vlan interface. If the name of the subinterface does not include the name of the parent, such as "vlan101", or when the name does not match vlan ID, such as "vlan8101", global preferences option "Verify interface names and autoconfigure their parameters..." should turned off. The option is located in the Preferences dialog, tab "Objects".
This commit is contained in:
parent
3333ea173f
commit
8b0febcb23
2
VERSION
2
VERSION
@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
|
|||||||
# build number is like "nano" version number. I am incrementing build
|
# build number is like "nano" version number. I am incrementing build
|
||||||
# number during development cycle
|
# number during development cycle
|
||||||
#
|
#
|
||||||
BUILD_NUM="3522"
|
BUILD_NUM="3523"
|
||||||
|
|
||||||
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
#define VERSION "4.2.0.3522"
|
#define VERSION "4.2.0.3523"
|
||||||
#define GENERATION "4.2"
|
#define GENERATION "4.2"
|
||||||
|
|||||||
@ -1,3 +1,20 @@
|
|||||||
|
2011-04-10 vadim <vadim@netcitadel.com>
|
||||||
|
|
||||||
|
* platforms.cpp (setInterfaceTypes): see #2224 "FreeBSD - Bridge
|
||||||
|
interfaces with the name vlan<xx> don't show as Bridge Port
|
||||||
|
Interfaces". This actually applies to all OS where we support vlan
|
||||||
|
and bridge interfaces. Fwbuilder GUI should allow the user to set
|
||||||
|
subinterface type to both "ethernet" and "vlan" when its parent
|
||||||
|
interface has type "bridge". Setting subinterface type to
|
||||||
|
"ethernet" makes it bridge port, while setting the type to "vlan"
|
||||||
|
signals policy compiler that it should generate code to configure
|
||||||
|
real vlan interface. If the name of the subinterface does not
|
||||||
|
include the name of the parent, such as "vlan101", or when the
|
||||||
|
name does not match vlan ID, such as "vlan8101", global
|
||||||
|
preferences option "Verify interface names and autoconfigure their
|
||||||
|
parameters..." should turned off. The option is located in the
|
||||||
|
Preferences dialog, tab "Objects".
|
||||||
|
|
||||||
2011-04-08 vadim <vadim@netcitadel.com>
|
2011-04-08 vadim <vadim@netcitadel.com>
|
||||||
|
|
||||||
* FWBSettings.cpp (init): fixed bug (no #): "Show text
|
* FWBSettings.cpp (init): fixed bug (no #): "Show text
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%define name fwbuilder
|
%define name fwbuilder
|
||||||
%define version 4.2.0.3522
|
%define version 4.2.0.3523
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
%if "%_vendor" == "MandrakeSoft"
|
%if "%_vendor" == "MandrakeSoft"
|
||||||
|
|||||||
@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
|
|||||||
Priority: extra
|
Priority: extra
|
||||||
Section: checkinstall
|
Section: checkinstall
|
||||||
Maintainer: vadim@fwbuilder.org
|
Maintainer: vadim@fwbuilder.org
|
||||||
Version: 4.2.0.3522-1
|
Version: 4.2.0.3523-1
|
||||||
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
||||||
Description: Firewall Builder GUI and policy compilers
|
Description: Firewall Builder GUI and policy compilers
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
%define name fwbuilder
|
%define name fwbuilder
|
||||||
%define version 4.2.0.3522
|
%define version 4.2.0.3523
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
%if "%_vendor" == "MandrakeSoft"
|
%if "%_vendor" == "MandrakeSoft"
|
||||||
|
|||||||
@ -565,44 +565,47 @@ void setInterfaceTypes(QComboBox *iface_type,
|
|||||||
getSubInterfaceTypes(Interface::cast(iface->getParent()), mapping);
|
getSubInterfaceTypes(Interface::cast(iface->getParent()), mapping);
|
||||||
else getInterfaceTypes(iface, mapping);
|
else getInterfaceTypes(iface, mapping);
|
||||||
|
|
||||||
// #335 : if interface name matches naming convention for vlan
|
if (st->getBool("Objects/Interface/autoconfigureInterfaces"))
|
||||||
// interfaces and vlan type is in the list that came from the
|
|
||||||
// resource file, then leave only vlan in the list we return.
|
|
||||||
// Note that if resource file says this subint can not be vlan, we
|
|
||||||
// dan't return vlan type on the list even if its name looks like
|
|
||||||
// it could be one.
|
|
||||||
FWObject *p = iface->getParentHost();
|
|
||||||
assert(p!=NULL);
|
|
||||||
QString host_os = p->getStr("host_OS").c_str();
|
|
||||||
QString obj_name = iface->getName().c_str();
|
|
||||||
|
|
||||||
Resources* os_res = Resources::os_res[p->getStr("host_OS")];
|
|
||||||
string os_family = p->getStr("host_OS");
|
|
||||||
if (os_res!=NULL)
|
|
||||||
os_family = os_res->getResourceStr("/FWBuilderResources/Target/family");
|
|
||||||
|
|
||||||
std::auto_ptr<interfaceProperties> int_prop(
|
|
||||||
interfacePropertiesObjectFactory::getInterfacePropertiesObject(
|
|
||||||
os_family));
|
|
||||||
if (int_prop->looksLikeVlanInterface(obj_name))
|
|
||||||
{
|
{
|
||||||
QString parent_name = iface->getParent()->getName().c_str();
|
// #335 : if interface name matches naming convention for vlan
|
||||||
QString err;
|
// interfaces and vlan type is in the list that came from the
|
||||||
if (int_prop->isValidVlanInterfaceName(obj_name, parent_name, err))
|
// resource file, then leave only vlan in the list we return.
|
||||||
|
// Note that if resource file says this subint can not be vlan, we
|
||||||
|
// dan't return vlan type on the list even if its name looks like
|
||||||
|
// it could be one.
|
||||||
|
FWObject *p = iface->getParentHost();
|
||||||
|
assert(p!=NULL);
|
||||||
|
QString host_os = p->getStr("host_OS").c_str();
|
||||||
|
QString obj_name = iface->getName().c_str();
|
||||||
|
|
||||||
|
Resources* os_res = Resources::os_res[p->getStr("host_OS")];
|
||||||
|
string os_family = p->getStr("host_OS");
|
||||||
|
if (os_res!=NULL)
|
||||||
|
os_family = os_res->getResourceStr("/FWBuilderResources/Target/family");
|
||||||
|
|
||||||
|
std::auto_ptr<interfaceProperties> int_prop(
|
||||||
|
interfacePropertiesObjectFactory::getInterfacePropertiesObject(
|
||||||
|
os_family));
|
||||||
|
if (int_prop->looksLikeVlanInterface(obj_name))
|
||||||
{
|
{
|
||||||
// iface can be valid vlan interface. Leave only vlan type
|
QString parent_name = iface->getParent()->getName().c_str();
|
||||||
// in the list if it was there to begin with.
|
QString err;
|
||||||
for (list<QStringPair>::iterator it=mapping.begin();
|
if (int_prop->isValidVlanInterfaceName(obj_name, parent_name, err))
|
||||||
it!=mapping.end(); ++it)
|
|
||||||
{
|
{
|
||||||
QString itype = it->first;
|
// iface can be valid vlan interface. Leave only vlan type
|
||||||
QString rtype = it->second;
|
// in the list if it was there to begin with.
|
||||||
if (itype == "8021q")
|
for (list<QStringPair>::iterator it=mapping.begin();
|
||||||
|
it!=mapping.end(); ++it)
|
||||||
{
|
{
|
||||||
mapping.clear();
|
QString itype = it->first;
|
||||||
mapping.push_back(QStringPair(itype, rtype));
|
QString rtype = it->second;
|
||||||
mapping.push_back(QStringPair("unknown", "Unknown"));
|
if (itype == "8021q")
|
||||||
break;
|
{
|
||||||
|
mapping.clear();
|
||||||
|
mapping.push_back(QStringPair(itype, rtype));
|
||||||
|
mapping.push_back(QStringPair("unknown", "Unknown"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,6 +112,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -112,6 +112,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -76,6 +76,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
</subinterfaces>
|
</subinterfaces>
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -113,6 +113,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -75,6 +75,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
</subinterfaces>
|
</subinterfaces>
|
||||||
|
|||||||
@ -112,6 +112,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -89,6 +89,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
@ -54,6 +54,7 @@
|
|||||||
</ethernet>
|
</ethernet>
|
||||||
<bridge>
|
<bridge>
|
||||||
<string>ethernet,Ethernet</string>
|
<string>ethernet,Ethernet</string>
|
||||||
|
<string>8021q,VLAN</string>
|
||||||
<string>unknown,Unknown</string>
|
<string>unknown,Unknown</string>
|
||||||
</bridge>
|
</bridge>
|
||||||
<bonding>
|
<bonding>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user