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:
@@ -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):
|
||||
|
||||
@@ -109,10 +109,18 @@ bool CreateObjectGroups::processNext()
|
||||
RuleElement *re = RuleElement::cast(rule->getFirstByType(re_type));
|
||||
|
||||
if (re->size()==1)
|
||||
{
|
||||
/* 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);
|
||||
if (obj_group==NULL)
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user