1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-24 04:07:55 +01:00

* Helper.cpp (findInterfaceByNetzone): fixed #1653 "Crash when

compiling a rule for Cisco PIX with incorrect network zone".
This commit is contained in:
Vadim Kurland 2010-08-02 22:29:06 +00:00
parent 914ffe8ded
commit 1f36ea00cd
4 changed files with 18 additions and 7 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 3182
#define BUILD_NUM 3183

View File

@ -1,3 +1,8 @@
2010-08-02 Vadim Kurland <vadim@vk.crocodile.org>
* Helper.cpp (findInterfaceByNetzone): fixed #1653 "Crash when
compiling a rule for Cisco PIX with incorrect network zone".
2010-07-29 Vadim Kurland <vadim@vk.crocodile.org>
* instDialog_installer.cpp (instDialog::installerSuccess):
@ -42,7 +47,7 @@
processed recursively". In the case of multi-level branches
the GUI should trace all references to find all firewalls affected
by a change of an object used in the rule.
2010-07-27 Vadim Kurland <vadim@vk.crocodile.org>
* configlets/linux24/block_action: fixed #1640 "default policy

View File

@ -39,6 +39,9 @@
#include <limits.h>
#include <iostream>
#include <QObject>
#include <QString>
using namespace libfwbuilder;
using namespace fwcompiler;
using namespace std;
@ -130,7 +133,7 @@ int Helper::findInterfaceByNetzone(Address *obj)
return findInterfaceByNetzone(obj->getAddressPtr());
}
int Helper::findInterfaceByNetzone(const InetAddr *addr) throw(string)
int Helper::findInterfaceByNetzone(const InetAddr *addr) throw(FWException)
{
#if DEBUG_NETZONE_OPS
cerr << "Helper::findInterfaceByNetzone "
@ -229,9 +232,11 @@ int Helper::findInterfaceByNetzone(const InetAddr *addr) throw(string)
if (res_id == -1) res_id = findInterfaceByAddress( addr );
if (res_id == -1)
throw(string("Can not find interface with network zone that includes "
"address ") + string((addr)?addr->toString():"NULL"));
{
QString err = QObject::tr("Can not find interface with network zone "
"that includes address '%1'");
throw(FWException(err.arg((addr)?addr->toString().c_str():"NULL").toStdString()));
}
return res_id;
}

View File

@ -33,6 +33,7 @@
#include <fwbuilder/FWObject.h>
#include <fwbuilder/Address.h>
#include <fwbuilder/Firewall.h>
#include <fwbuilder/FWException.h>
namespace fwcompiler {
@ -57,7 +58,7 @@ namespace fwcompiler {
* that object 'obj' belongs to. Returns interface ID
*/
int findInterfaceByNetzone(const libfwbuilder::InetAddr *a)
throw(std::string);
throw(libfwbuilder::FWException);
int findInterfaceByNetzone(libfwbuilder::Address *obj);
std::list<int> findInterfaceByNetzoneOrAll(
libfwbuilder::RuleElement *re);