From dad78e4890eaa51164690f1b84943a779783a49d Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Tue, 17 Feb 2009 18:26:01 +0000 Subject: [PATCH] 2009-02-17 vadim * Management.cpp (Management::fromXML): (change in libfwbuilder): fixed bug #2609796 "internal object Management does not accept ipv6 address". Class Management should accept ipv6 address. The problem was that if an interface of the firewall had only ipv6 address and was marked as "management" interface, saving such configuration to .fwb file created broken data file that could not be loaded back. The error was: The program encountered error trying to load data file. The file has not been loaded. Error: Exception: Invalid IP address: aaaa:bbbb:cccc::1 XML element : Management where aaaa:bbbb:cccc: is ipv6 address. --- build_num | 2 +- doc/ChangeLog | 18 ++++++++++++++++++ src/gui/instDialog.cpp | 34 ---------------------------------- src/gui/instDialog_ui_ops.cpp | 3 +++ 4 files changed, 22 insertions(+), 35 deletions(-) diff --git a/build_num b/build_num index 952cc5582..902368d39 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 760 +#define BUILD_NUM 761 diff --git a/doc/ChangeLog b/doc/ChangeLog index dfc9fc4bb..28a889c34 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,21 @@ +2009-02-17 vadim + + * Management.cpp (Management::fromXML): (change in libfwbuilder): + fixed bug #2609796 "internal object Management does not accept + ipv6 address". Class Management should accept ipv6 address. The + problem was that if an interface of the firewall had only ipv6 + address and was marked as "management" interface, saving such + configuration to .fwb file created broken data file that could not + be loaded back. The error was: + + The program encountered error trying to load data file. + The file has not been loaded. Error: + Exception: Invalid IP address: 'aaaa:bbbb:cccc::1' + XML element : Management + + where aaaa:bbbb:cccc: is ipv6 address. + + 2009-02-13 vadim * PolicyCompiler_ipt.cpp (finalizeChain::processNext): fixed bug diff --git a/src/gui/instDialog.cpp b/src/gui/instDialog.cpp index 4e409eafc..cad2546c2 100644 --- a/src/gui/instDialog.cpp +++ b/src/gui/instDialog.cpp @@ -438,37 +438,3 @@ void instDialog::blockInstallForFirewall(Firewall *fw) installMapping[fw]->setCheckState(Qt::Unchecked); } -#if 0 -void instDialog::analyseInstallQueue(bool &fPix, bool &fCustInst) -{ - if (fwbdebug) qDebug("instDialog::analyseInstallQueue"); - Firewall *f; - //FWOptions *fwopt; - Management *mgmt; - PolicyInstallScript *pis; - - fPix=false; - fCustInst=true; - - t_fwList::iterator i; - for(i=opList.begin(); i!=opList.end(); ++i) - { - f=(*i); - //fwopt=f->getOptionsObject(); - mgmt=f->getManagementObject(); - pis = mgmt->getPolicyInstallScript(); - - fPix = fPix || f->getStr("platform")=="pix" || f->getStr("platform")=="fwsm" || f->getStr("platform")=="iosacl"; - fCustInst = fCustInst && !( pis->getCommand()=="" ); - - if (fwbdebug) - { - qDebug(("f:"+f->getName()).c_str()); - qDebug(("p:"+f->getStr("platform")).c_str()); - qDebug((QString("fPix:")+(fPix?"true":"false")).toAscii().constData()); - } - - if (fPix && !fCustInst) return;// nothing can change if we continue loop - } -} -#endif diff --git a/src/gui/instDialog_ui_ops.cpp b/src/gui/instDialog_ui_ops.cpp index d67071505..a381cf94f 100644 --- a/src/gui/instDialog_ui_ops.cpp +++ b/src/gui/instDialog_ui_ops.cpp @@ -935,6 +935,9 @@ void instDialog::readInstallerOptionsFromFirewallObject(Firewall *fw) if (!aaddr.isEmpty()) cnf.maddr = aaddr; else { + // Note that Host::getManagementAddress() scans interfaces and + // finds one marked as "management" and takes its address. + // It does not use Management child object. const InetAddr *mgmt_addr = cnf.fwobj->getManagementAddress(); if (mgmt_addr) cnf.maddr = mgmt_addr->toString().c_str();