1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 03:37:15 +01:00

see #2655 Interface names are not allowed to have dash "-" even with

interface verification off. We should allow "-" in the interface name
for Cisco IOS
This commit is contained in:
Vadim Kurland 2011-09-19 14:53:39 -07:00
parent 2a74bc273d
commit 4c5bf811c6
9 changed files with 47 additions and 5 deletions

View File

@ -7,7 +7,7 @@ FWB_MICRO_VERSION=1
# build number is like "nano" version number. I am incrementing build
# number during development cycle
#
BUILD_NUM="3578"
BUILD_NUM="3579"
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"

View File

@ -1,2 +1,2 @@
#define VERSION "5.0.1.3578"
#define VERSION "5.0.1.3579"
#define GENERATION "5.0"

View File

@ -1,3 +1,10 @@
2011-09-19 Vadim Kurland <vadim@netcitadel.com>
* iosInterfaces.cpp (iosInterfaces::basicValidateInterfaceName):
see #2655 Interface names are not allowed to have dash "-" even
with interface verification off. We should allow "-" in the
interface name for Cisco IOS
2011-09-04 Vadim Kurland <vadim@netcitadel.com>
* IPTImporter.cpp (IPTImporter::isSupportedTable): see #2653

View File

@ -3,7 +3,7 @@
%define name fwbuilder
%define version 5.0.1.3578
%define version 5.0.1.3579
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
Priority: extra
Section: checkinstall
Maintainer: vadim@fwbuilder.org
Version: 5.0.1.3578-1
Version: 5.0.1.3579-1
Depends: libqt4-gui (>= 4.4.0), libqt4-network (>= 4.4.0), libxml2, libxslt1.1, libsnmp | libsnmp15
Description: Firewall Builder GUI and policy compilers

View File

@ -1,6 +1,6 @@
%define name fwbuilder
%define version 5.0.1.3578
%define version 5.0.1.3579
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@ -25,8 +25,16 @@
#include "iosInterfaces.h"
#include "fwbuilder/Interface.h"
#include <QDebug>
#include <QObject>
#include <QRegExp>
using namespace std;
using namespace libfwbuilder;
bool iosInterfaces::parseVlan(const QString &name, QString *base_name, int *vlan_id)
{
QRegExp vlan_name_pattern("([a-zA-Z-]+\\d{1,}/\\d{1,})\\.(\\d{1,})");
@ -39,3 +47,17 @@ bool iosInterfaces::parseVlan(const QString &name, QString *base_name, int *vlan
return false;
}
// simple name validation: does not allow space and "-"
// However some platform permit space (procurve).
bool iosInterfaces::basicValidateInterfaceName(Interface *,
const QString &obj_name,
QString &err)
{
if (obj_name.indexOf(' ') != -1)
{
err = QObject::tr("Interface name '%1' can not contain white space").arg(obj_name);
return false;
}
return true;
}

View File

@ -34,6 +34,12 @@ class iosInterfaces : public interfaceProperties
public:
iosInterfaces() : interfaceProperties() {}
// simple name validation: does not allow space. Unlike this function
// in the base class, permit "-"
virtual bool basicValidateInterfaceName(libfwbuilder::Interface *intf,
const QString &proposed_name,
QString &err);
virtual bool parseVlan(const QString&, QString*, int*);
};

View File

@ -127,6 +127,13 @@
</p>
</li>
<li>
<p>
see #2655 Interface names are not allowed to have dash "-" even
with interface verification off. We should allow "-" in the
interface name for Cisco IOS
</p>
</li>
</ul>