From 6f842f1b994e042c7fb57d0e7ee1846d6120f8fc Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Thu, 7 Jul 2011 11:04:45 -0700 Subject: [PATCH] see #2551 making sure rules that have route-to option get the call to setRoute() in the importer --- src/import/PFImporter.cpp | 2 ++ src/import/PFImporterRun.cpp | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/import/PFImporter.cpp b/src/import/PFImporter.cpp index 188f3b3cb..d4f503cc8 100644 --- a/src/import/PFImporter.cpp +++ b/src/import/PFImporter.cpp @@ -870,6 +870,8 @@ void PFImporter::pushPolicyRule() .arg(rs.address.c_str()).arg(rs.netmask.c_str()); } ropt->setStr("pf_route_opt_addr", route_opt_addr.join(",").toStdString()); + + rule->setRouting( ! ropt->getStr("pf_route_option").empty()); } /* diff --git a/src/import/PFImporterRun.cpp b/src/import/PFImporterRun.cpp index 6e5ac4b36..8a261ae36 100644 --- a/src/import/PFImporterRun.cpp +++ b/src/import/PFImporterRun.cpp @@ -103,6 +103,12 @@ void PFImporter::run() int pass = 0; while (1) { + if (fwbdebug) + { + qDebug() << "################################"; + qDebug() << "Pass " << pass; + } + QMapIterator it(macros); while (it.hasNext()) { @@ -114,6 +120,13 @@ void PFImporter::run() whole_input.replace(macro_instance, macro_value); } QRegExp any_macro_instance("\\$\\w+\\W"); + + if (fwbdebug) + { + qDebug() << "pf.conf file after line unfolding and macro substitution:"; + qDebug() << whole_input; + } + if (! whole_input.contains(any_macro_instance)) break; pass++; }