1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-08-18 15:04:44 +02:00

fixes #2660 "compiler for IOSACL crashed when address range appears in

a rule AND object-group option is turned ON"
This commit is contained in:
Vadim Kurland
2011-09-24 19:14:28 -07:00
parent b68eac1f43
commit ac28c2f84a
4 changed files with 50 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2011-09-24 Vadim Kurland <vadim@netcitadel.com>
* NamedObjectsAndGroupsSupport.cpp (CreateObjectGroups::processNext):
fixes #2660 "compiler for IOSACL crashed when address range appears
in a rule AND object-group option is turned ON"
2011-09-19 Vadim Kurland <vadim@netcitadel.com>
* PolicyCompiler_cisco_acls.cpp (setInterfaceAndDirectionBySrc):

View File

@@ -110,8 +110,16 @@ bool CreateObjectGroups::processNext()
if (re->size()==1)
{
tmp_queue.push_back(rule);
return true;
/* create object group if the object in the RE is AddressRange
* because IOS normally does not support ranges in ACLs, but
* supports them in groups
*/
FWObject *re_obj = FWReference::getObject(re->front());
if ( ! AddressRange::isA(re_obj))
{
tmp_queue.push_back(rule);
return true;
}
}
BaseObjectGroup *obj_group = findObjectGroup(re);

View File

@@ -510,7 +510,25 @@ string PolicyCompiler_iosacl::PrintRule::_printAddr(Address *o)
const InetAddr *srcaddr = o->getAddressPtr();
if (srcaddr)
{
const InetAddr srcmask = *(o->getNetmaskPtr());
const InetAddr *nm = o->getNetmaskPtr();
InetAddr srcmask;
if (nm != NULL)
{
srcmask = *nm;
} else
{
cerr << "Address object "
<< o
<< " "
<< o->getName()
<< " (" << o->getTypeName() << ") "
<< " has no netmask"
<< endl;
srcmask = InetAddr(InetAddr::getAllOnes(srcaddr->addressFamily()));
}
// const InetAddr srcmask = *(o->getNetmaskPtr());
if (srcaddr->isAny() && srcmask.isAny())
{

View File

@@ -256,6 +256,21 @@
</ul>
<!-- ######################################################################### -->
<a name="iosacl"></a>
<h2>Changes in support for Cisco IOS ACL</h2>
<ul>
<li>
<p>
fixes #2660 "compiler for IOSACL crashed when address range
appears in a rule AND object-group option is turned ON"
</p>
</li>
</ul>
<!-- ######################################################################### -->
<a name="pix"></a>
<h2>Changes in support for Cisco ASA (PIX, FWSM)</h2>