1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-25 12:47:44 +01:00

fixes pix compiler crash when dynamic interface is used in ODst of a nat rule

This commit is contained in:
Vadim Kurland 2011-03-22 16:03:31 -07:00
parent da317dd151
commit 90f6689886

View File

@ -104,9 +104,17 @@ list<NATRule*> NATCompiler_pix::findMatchingDNATRules(
// Address *tdst = getFirstTDst(rule); assert(tdst);
Service *tsrv = getFirstTSrv(rule); assert(tsrv);
const InetAddr *dst_to_compare_addr = dst_to_compare->getAddressPtr();
// dst_to_compare_addr can be NULL if object in rule
// element is a dynamic interface or a group. We should
// have expanded groups by now, but dynamic interface can
// still be there.
if (*(src->getAddressPtr()) == *(osrc->getAddressPtr()) &&
(osrv->isAny() || srv->getId()==tsrv->getId()) &&
*(dst->getAddressPtr()) == *(dst_to_compare->getAddressPtr()))
(dst_to_compare_addr == NULL ||
*(dst->getAddressPtr()) == *(dst_to_compare_addr)))
{
if (osrv->isAny())
{