diff --git a/build_num b/build_num index 9fc9eb6c8..cde18752f 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 772 +#define BUILD_NUM 773 diff --git a/doc/ChangeLog b/doc/ChangeLog index 5efa79997..d9915d80e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2009-03-04 vadim + + * iosacl.cpp (main), FirewallDialog::platformChanged(): fixed bug + #2662290: "fwb_iosacl crash after firewall converted from + iptables". If user changed platform setting of the firewall + object, the program preserved its old version which was invalid + for the new platform. + 2009-03-02 vadim * RoutingCompiler_ipt_writers.cpp (PrintRule::processNext): finish diff --git a/src/gui/FirewallDialog.cpp b/src/gui/FirewallDialog.cpp index c194bda98..597eedbc7 100644 --- a/src/gui/FirewallDialog.cpp +++ b/src/gui/FirewallDialog.cpp @@ -179,7 +179,7 @@ void FirewallDialog::platformChanged() ]->getResourceStr("/FWBuilderResources/Target/supported_os").c_str(); if (so.isEmpty()) return; - QString ho=so.section(",",0); + QString ho = so.section(",",0); setHostOS( m_dialog->hostOS, ho.toLatin1().constData() ); QString pl = readPlatform(m_dialog->platform); diff --git a/src/gui/firewalldialog_q.ui b/src/gui/firewalldialog_q.ui index 96ba62aa2..fc16fa38f 100644 --- a/src/gui/firewalldialog_q.ui +++ b/src/gui/firewalldialog_q.ui @@ -33,9 +33,6 @@ 2 - - 0 - @@ -524,7 +521,7 @@ platform activated(int) FirewallDialog_q - changed() + platformChanged() 20 @@ -556,7 +553,7 @@ hostOS activated(int) FirewallDialog_q - changed() + hostOSChanged() 20 @@ -569,4 +566,8 @@ + + platformChanged() + hostOSChanged() + diff --git a/src/iosacl/iosacl.cpp b/src/iosacl/iosacl.cpp index e33fc9f6f..b8d639433 100644 --- a/src/iosacl/iosacl.cpp +++ b/src/iosacl/iosacl.cpp @@ -262,6 +262,17 @@ int main(int argc, char * const * argv) string fwvers = fw->getStr("version"); if (fwvers == "") fw->setStr("version", "12.x"); + string platform = fw->getStr("platform"); + string clearACLCmd = Resources::platform_res[platform]->getResourceStr( + string("/FWBuilderResources/Target/options/") + + "version_" + fwvers + "/iosacl_commands/clear_ip_acl"); + if (clearACLCmd.empty()) + { + // incorrect version. This could have happened if user converted + // firewall platform. See bug #2662290 + fw->setStr("version", "12.x"); + } + bool ios_acl_basic=options->getBool("ios_acl_basic"); bool ios_acl_no_clear=options->getBool("ios_acl_no_clear"); bool ios_acl_substitution=options->getBool("ios_acl_substitution"); @@ -490,11 +501,8 @@ int main(int argc, char * const * argv) ofile << endl; - string vers = fw->getStr("version"); - string platform = fw->getStr("platform"); - ofile << "!" << endl; - ofile << "!" << " Compiled for " << platform << " " << vers << endl; + ofile << "!" << " Compiled for " << platform << " " << fwvers << endl; ofile << "!" << endl; ofile << "!" << MANIFEST_MARKER << "* " << ofname << endl;