diff --git a/src/cisco_lib/ASA8ObjectGroup.cpp b/src/cisco_lib/ASA8ObjectGroup.cpp index 8cc79f533..c989fe938 100644 --- a/src/cisco_lib/ASA8ObjectGroup.cpp +++ b/src/cisco_lib/ASA8ObjectGroup.cpp @@ -124,7 +124,7 @@ string ASA8ObjectGroup::toString() throw(FWException) continue; } - throw FWException("Unknown object group type"); + throw FWException("ASA8ObjectGroup: Unknown object group type"); } } ostr << " exit" << endl << endl; @@ -137,7 +137,8 @@ string ASA8ObjectGroup::getObjectGroupClass() { case NETWORK: return "network"; case MIXED_SERVICE: return "service";; - default: throw FWException("Unknown object group type"); + default: + throw FWException("ASA8ObjectGroup: Unknown object group type"); } } diff --git a/src/cisco_lib/ObjectGroupsSupport.cpp b/src/cisco_lib/ObjectGroupsSupport.cpp index 4d753ae39..70a6027c7 100644 --- a/src/cisco_lib/ObjectGroupsSupport.cpp +++ b/src/cisco_lib/ObjectGroupsSupport.cpp @@ -121,9 +121,10 @@ bool CreateObjectGroups::processNext() string version = compiler->fw->getStr("version"); string platform = compiler->fw->getStr("platform"); - bool supports_mixed_groups = Resources::platform_res[platform]->getResourceBool( - string("/FWBuilderResources/Target/options/") + - "version_" + version + "/supports_mixed_service_groups"); + bool supports_mixed_groups = + Resources::platform_res[platform]->getResourceBool( + string("/FWBuilderResources/Target/options/") + + "version_" + version + "/supports_mixed_service_groups"); BaseObjectGroup *obj_group = findObjectGroup(re); if (obj_group==NULL) @@ -131,20 +132,19 @@ bool CreateObjectGroups::processNext() //obj_group= new BaseObjectGroup(); obj_group = ObjectGroupFactory::createObjectGroup(compiler->fw); - if (supports_mixed_groups) + FWObject *o = re->front(); + FWObject *obj = FWReference::getObject(o); + obj_group->setObjectGroupTypeFromFWObject(obj); + + if (obj_group->isServiceGroup() && supports_mixed_groups) { obj_group->setObjectGroupType(BaseObjectGroup::MIXED_SERVICE); - } else - { - FWObject *o = re->front(); - FWObject *obj = FWReference::getObject(o); - obj_group->setObjectGroupTypeFromFWObject(obj); - } - + } QStringList gn; if (!rule_iface->getLabel().empty()) gn.push_back(rule_iface->getLabel().c_str()); + gn.push_back(rule->getUniqueId().c_str()); gn.push_back(name_suffix.c_str()); obj_group->setName(gn.join(".").toStdString()); @@ -153,10 +153,11 @@ bool CreateObjectGroups::processNext() for (FWObject::iterator i1=re->begin(); i1!=re->end(); ++i1) { - FWObject *o = *i1; + FWObject *o = *i1; FWObject *obj = o; - if (FWReference::cast(o)!=NULL) obj=FWReference::cast(o)->getPointer(); - obj_group->addRef( obj ); + if (FWReference::cast(o)!=NULL) + obj = FWReference::cast(o)->getPointer(); + obj_group->addRef(obj); } } re->clearChildren(false); // do not want to destroy children objects diff --git a/src/cisco_lib/PIXObjectGroup.cpp b/src/cisco_lib/PIXObjectGroup.cpp index 1ec19f458..b863e77fd 100644 --- a/src/cisco_lib/PIXObjectGroup.cpp +++ b/src/cisco_lib/PIXObjectGroup.cpp @@ -121,7 +121,7 @@ string PIXObjectGroup::toString() throw(FWException) continue; } - throw FWException("Unknown object group type"); + throw FWException("PIXObjectGroup: Unknown object group type"); } } ostr << " exit" << endl << endl; @@ -137,7 +137,8 @@ string PIXObjectGroup::getObjectGroupClass() case ICMP_TYPE: return "icmp-type"; case TCP_SERVICE: return "service"; case UDP_SERVICE: return "service"; - default: throw FWException("Unknown object group type"); + default: + throw FWException("PIXObjectGroup: Unknown object group type"); } } diff --git a/test/pix/cluster1-1_pix1.fw.orig b/test/pix/cluster1-1_pix1.fw.orig index 94f461eeb..8cd33fee1 100755 --- a/test/pix/cluster1-1_pix1.fw.orig +++ b/test/pix/cluster1-1_pix1.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:11 2011 PST by vadim +! Generated Wed Jan 12 16:02:34 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/cluster1-1_pix2.fw.orig b/test/pix/cluster1-1_pix2.fw.orig index b1f09ec6f..dce3cf5e7 100755 --- a/test/pix/cluster1-1_pix2.fw.orig +++ b/test/pix/cluster1-1_pix2.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:11 2011 PST by vadim +! Generated Wed Jan 12 16:02:35 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/cluster1_pix1.fw.orig b/test/pix/cluster1_pix1.fw.orig index 56d8b6b58..73c959f69 100755 --- a/test/pix/cluster1_pix1.fw.orig +++ b/test/pix/cluster1_pix1.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:10 2011 PST by vadim +! Generated Wed Jan 12 16:02:34 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/cluster1_pix2.fw.orig b/test/pix/cluster1_pix2.fw.orig index 30317df9b..4d35a2842 100755 --- a/test/pix/cluster1_pix2.fw.orig +++ b/test/pix/cluster1_pix2.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:10 2011 PST by vadim +! Generated Wed Jan 12 16:02:34 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/firewall.fw.orig b/test/pix/firewall.fw.orig index d362644d9..dc348c6a4 100755 --- a/test/pix/firewall.fw.orig +++ b/test/pix/firewall.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:37 2011 PST by vadim +! Generated Wed Jan 12 16:02:00 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall1.fw.orig b/test/pix/firewall1.fw.orig index b2ee9559d..f8fad1326 100755 --- a/test/pix/firewall1.fw.orig +++ b/test/pix/firewall1.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:38 2011 PST by vadim +! Generated Wed Jan 12 16:02:01 2011 PST by vadim ! ! Compiled for pix 6.1 ! Outbound ACLs: not supported diff --git a/test/pix/firewall10.fw.orig b/test/pix/firewall10.fw.orig index 2ca266b29..7697d77af 100755 --- a/test/pix/firewall10.fw.orig +++ b/test/pix/firewall10.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:39 2011 PST by vadim +! Generated Wed Jan 12 16:02:02 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall11.fw.orig b/test/pix/firewall11.fw.orig index e716014aa..113599e56 100755 --- a/test/pix/firewall11.fw.orig +++ b/test/pix/firewall11.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:40 2011 PST by vadim +! Generated Wed Jan 12 16:02:03 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall12.fw.orig b/test/pix/firewall12.fw.orig index daa3301d7..6e52830e4 100755 --- a/test/pix/firewall12.fw.orig +++ b/test/pix/firewall12.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:41 2011 PST by vadim +! Generated Wed Jan 12 16:02:04 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall13.fw.orig b/test/pix/firewall13.fw.orig index d3b8778e5..d7624e8b6 100755 --- a/test/pix/firewall13.fw.orig +++ b/test/pix/firewall13.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:42 2011 PST by vadim +! Generated Wed Jan 12 16:02:05 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall14.fw.orig b/test/pix/firewall14.fw.orig index 7ddf4ada9..71ac7d692 100755 --- a/test/pix/firewall14.fw.orig +++ b/test/pix/firewall14.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:43 2011 PST by vadim +! Generated Wed Jan 12 16:02:06 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall2.fw.orig b/test/pix/firewall2.fw.orig index d39834d62..6a0f2bda2 100755 --- a/test/pix/firewall2.fw.orig +++ b/test/pix/firewall2.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:44 2011 PST by vadim +! Generated Wed Jan 12 16:02:07 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall20.fw.orig b/test/pix/firewall20.fw.orig index 61a411051..d69aaccbd 100755 --- a/test/pix/firewall20.fw.orig +++ b/test/pix/firewall20.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:45 2011 PST by vadim +! Generated Wed Jan 12 16:02:08 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall21-1.fw.orig b/test/pix/firewall21-1.fw.orig index 46cf8358b..da41345d2 100755 --- a/test/pix/firewall21-1.fw.orig +++ b/test/pix/firewall21-1.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:47 2011 PST by vadim +! Generated Wed Jan 12 16:02:10 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall21.fw.orig b/test/pix/firewall21.fw.orig index 35f73b971..2fd382287 100755 --- a/test/pix/firewall21.fw.orig +++ b/test/pix/firewall21.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:46 2011 PST by vadim +! Generated Wed Jan 12 16:02:09 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/firewall22.fw.orig b/test/pix/firewall22.fw.orig index 311c5b633..cb8825bf5 100755 --- a/test/pix/firewall22.fw.orig +++ b/test/pix/firewall22.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:48 2011 PST by vadim +! Generated Wed Jan 12 16:02:11 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/firewall3.fw.orig b/test/pix/firewall3.fw.orig index 2c3cf5696..4262d5f2d 100755 --- a/test/pix/firewall3.fw.orig +++ b/test/pix/firewall3.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:49 2011 PST by vadim +! Generated Wed Jan 12 16:02:12 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall33.fw.orig b/test/pix/firewall33.fw.orig index 0d0bf0568..70f97832f 100755 --- a/test/pix/firewall33.fw.orig +++ b/test/pix/firewall33.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:50 2011 PST by vadim +! Generated Wed Jan 12 16:02:13 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall34.fw.orig b/test/pix/firewall34.fw.orig index b40053d58..d66eb157c 100755 --- a/test/pix/firewall34.fw.orig +++ b/test/pix/firewall34.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:51 2011 PST by vadim +! Generated Wed Jan 12 16:02:14 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall4.fw.orig b/test/pix/firewall4.fw.orig index 0fb2f8a43..9203efa58 100755 --- a/test/pix/firewall4.fw.orig +++ b/test/pix/firewall4.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:52 2011 PST by vadim +! Generated Wed Jan 12 16:02:15 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall50.fw.orig b/test/pix/firewall50.fw.orig index 50288519f..884865b13 100755 --- a/test/pix/firewall50.fw.orig +++ b/test/pix/firewall50.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:53 2011 PST by vadim +! Generated Wed Jan 12 16:02:17 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/firewall6.fw.orig b/test/pix/firewall6.fw.orig index eacca7955..77cc70182 100755 --- a/test/pix/firewall6.fw.orig +++ b/test/pix/firewall6.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:54 2011 PST by vadim +! Generated Wed Jan 12 16:02:17 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall8.fw.orig b/test/pix/firewall8.fw.orig index d672cd422..558fabd24 100755 --- a/test/pix/firewall8.fw.orig +++ b/test/pix/firewall8.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:55 2011 PST by vadim +! Generated Wed Jan 12 16:02:19 2011 PST by vadim ! ! Compiled for pix 6.2 ! Outbound ACLs: not supported diff --git a/test/pix/firewall80.fw.orig b/test/pix/firewall80.fw.orig index 0086d05c3..23ad9bd89 100755 --- a/test/pix/firewall80.fw.orig +++ b/test/pix/firewall80.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:56 2011 PST by vadim +! Generated Wed Jan 12 16:02:20 2011 PST by vadim ! ! Compiled for pix 8.2 ! Outbound ACLs: supported diff --git a/test/pix/firewall81.fw.orig b/test/pix/firewall81.fw.orig index da1b4d419..b462eeeae 100755 --- a/test/pix/firewall81.fw.orig +++ b/test/pix/firewall81.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:57 2011 PST by vadim +! Generated Wed Jan 12 16:02:21 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported diff --git a/test/pix/firewall82.fw.orig b/test/pix/firewall82.fw.orig index 33e5ada53..66455f534 100755 --- a/test/pix/firewall82.fw.orig +++ b/test/pix/firewall82.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:58 2011 PST by vadim +! Generated Wed Jan 12 16:02:22 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported diff --git a/test/pix/firewall83.fw.orig b/test/pix/firewall83.fw.orig index bed825688..d8dd2f411 100755 --- a/test/pix/firewall83.fw.orig +++ b/test/pix/firewall83.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:00:59 2011 PST by vadim +! Generated Wed Jan 12 16:02:23 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported diff --git a/test/pix/firewall9.fw.orig b/test/pix/firewall9.fw.orig index 40330be48..74851d0bf 100755 --- a/test/pix/firewall9.fw.orig +++ b/test/pix/firewall9.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:00 2011 PST by vadim +! Generated Wed Jan 12 16:02:24 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported diff --git a/test/pix/firewall90.fw.orig b/test/pix/firewall90.fw.orig index f73db8599..4c2980835 100755 --- a/test/pix/firewall90.fw.orig +++ b/test/pix/firewall90.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:01 2011 PST by vadim +! Generated Wed Jan 12 16:02:25 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported @@ -93,6 +93,15 @@ clear config access-list clear config object-group clear config icmp clear config telnet + +object-group network outside.id78630X30274.src.net.0 + network-object 10.1.2.0 255.255.255.0 + network-object 10.1.3.0 255.255.255.0 + exit + +! +! Rule 0 (global) +access-list outside_acl_in deny ip object-group outside.id78630X30274.src.net.0 any ! ! Rule 1 (global) access-list inside_acl_in deny ip any any diff --git a/test/pix/firewall91.fw.orig b/test/pix/firewall91.fw.orig index 693cdb2b3..6d40b68d0 100755 --- a/test/pix/firewall91.fw.orig +++ b/test/pix/firewall91.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:02 2011 PST by vadim +! Generated Wed Jan 12 16:02:26 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported diff --git a/test/pix/firewall92.fw.orig b/test/pix/firewall92.fw.orig index cec8876f5..6e9c30ae9 100755 --- a/test/pix/firewall92.fw.orig +++ b/test/pix/firewall92.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:03 2011 PST by vadim +! Generated Wed Jan 12 16:02:26 2011 PST by vadim ! ! Compiled for pix 8.3 ! Outbound ACLs: supported diff --git a/test/pix/fwsm1.fw.orig b/test/pix/fwsm1.fw.orig index da408511c..81493d7e7 100755 --- a/test/pix/fwsm1.fw.orig +++ b/test/pix/fwsm1.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:04 2011 PST by vadim +! Generated Wed Jan 12 16:02:28 2011 PST by vadim ! ! Compiled for fwsm 2.3 ! Outbound ACLs: supported diff --git a/test/pix/fwsm2.fw.orig b/test/pix/fwsm2.fw.orig index 5e3c3c135..bfbc0db7a 100755 --- a/test/pix/fwsm2.fw.orig +++ b/test/pix/fwsm2.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:05 2011 PST by vadim +! Generated Wed Jan 12 16:02:29 2011 PST by vadim ! ! Compiled for fwsm 4.x ! Outbound ACLs: supported diff --git a/test/pix/objects-for-regression-tests.fwb b/test/pix/objects-for-regression-tests.fwb index 560c26561..9909d370b 100644 --- a/test/pix/objects-for-regression-tests.fwb +++ b/test/pix/objects-for-regression-tests.fwb @@ -18228,7 +18228,7 @@ no sysopt nodnsalias outbound - + @@ -18670,7 +18670,7 @@ no sysopt nodnsalias outbound - + diff --git a/test/pix/pix515.fw.orig b/test/pix/pix515.fw.orig index 09cdc4108..c0916238b 100755 --- a/test/pix/pix515.fw.orig +++ b/test/pix/pix515.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:07 2011 PST by vadim +! Generated Wed Jan 12 16:02:30 2011 PST by vadim ! ! Compiled for pix 7.0 ! Outbound ACLs: supported diff --git a/test/pix/real.fw.orig b/test/pix/real.fw.orig index b23f9d6d7..bce8d76f1 100755 --- a/test/pix/real.fw.orig +++ b/test/pix/real.fw.orig @@ -3,7 +3,7 @@ ! ! Firewall Builder fwb_pix v4.2.0.3430 ! -! Generated Wed Jan 12 15:01:08 2011 PST by vadim +! Generated Wed Jan 12 16:02:31 2011 PST by vadim ! ! Compiled for pix 6.3 ! Outbound ACLs: not supported