diff --git a/build_num b/build_num index 1d8ac6b48..b448a949c 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 783 +#define BUILD_NUM 784 diff --git a/doc/ChangeLog b/doc/ChangeLog index 3cec19772..9ace4cdfa 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2009-03-18 vadim + + * PolicyCompiler_iosacl.cpp (PolicyCompiler_iosacl::prolog): fixed + bug (no #): temporary access list created for IOS when option + "safety net install" is used and ipv6 address is provided should + use keyword "host" if provided address does not specify netmask. + + * fwbedit: properly saving data file after "checktree" operation + 2009-03-17 vadim * PolicyCompiler_iosacl.cpp (PolicyCompiler_iosacl::prolog): fixed diff --git a/src/fwbedit/fwbedit.cpp b/src/fwbedit/fwbedit.cpp index 8ae86b441..a5ff98deb 100644 --- a/src/fwbedit/fwbedit.cpp +++ b/src/fwbedit/fwbedit.cpp @@ -51,6 +51,11 @@ #include #include +#include +#ifndef errno +extern int errno; +#endif + #ifdef HAVE_GETOPT_H # include #else @@ -560,7 +565,6 @@ int main(int argc, char * const *argv) if (cmd == STRUCT) { checkAndRepairTree(objdb); - return(0); } else if (cmd == LIST) { @@ -634,10 +638,15 @@ int main(int argc, char * const *argv) } } - string bakfile=filename+".bak"; - - rename(filename.c_str(),bakfile.c_str()); - objdb->saveFile(filename); + string bakfile = filename+".bak"; + if (rename(filename.c_str(),bakfile.c_str()) == 0) + objdb->saveFile(filename); + else + { + cout << "Could not rename data file, abroting operation" << endl; + cout << strerror(errno) << endl; + exit(-1); + } } catch(FWException &ex) { cerr << ex.toString() << endl; diff --git a/src/gui/ObjectManipulator.cpp b/src/gui/ObjectManipulator.cpp index 3a1b63223..32ea5fc39 100644 --- a/src/gui/ObjectManipulator.cpp +++ b/src/gui/ObjectManipulator.cpp @@ -2629,7 +2629,7 @@ FWObject* ObjectManipulator::createObject(const QString &objType, QObject::tr( "Type '%1': new object can not be created because\n" "corresponding branch is missing in the object tree.\n" -"Please repair the tree using command 'fwbedit -s -f file.fwb'.") +"Please repair the tree using command 'fwbedit checktree -f file.fwb'.") .arg(objType), "&Continue", QString::null, QString::null, 0, 1 ); diff --git a/src/iosacl/PolicyCompiler_iosacl.cpp b/src/iosacl/PolicyCompiler_iosacl.cpp index a36f4da09..cd13a02fe 100644 --- a/src/iosacl/PolicyCompiler_iosacl.cpp +++ b/src/iosacl/PolicyCompiler_iosacl.cpp @@ -180,7 +180,10 @@ int PolicyCompiler_iosacl::prolog() addr_family_prefix = "ipv6"; output << clearACLcmd << " " << temp_acl << endl; output << "ipv6 access-list " << temp_acl << endl; - output << " permit ipv6 " << addr << " any " << endl; + if (slash_idx!=string::npos) + output << " permit ipv6 " << addr << " any " << endl; + else + output << " permit ipv6 host " << addr << " any " << endl; output << " deny ipv6 any any " << endl; output << "exit" << endl; output << endl; diff --git a/test/iosacl/objects-for-regression-tests.fwb b/test/iosacl/objects-for-regression-tests.fwb index b0c7e967d..4d750ea35 100644 --- a/test/iosacl/objects-for-regression-tests.fwb +++ b/test/iosacl/objects-for-regression-tests.fwb @@ -1,6 +1,6 @@ - + @@ -18,12 +18,8 @@ - - - - @@ -1934,7 +1930,7 @@ - + @@ -2309,10 +2305,25 @@ - + + + + - + + + + + + + + + + + + + @@ -2415,6 +2426,7 @@ + @@ -3468,6 +3480,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +