1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 11:17:31 +01:00

tag, classify and route options now work in the GUI; so far, only showing icons without the parameter in the rule set view; editor works, rule set view works

This commit is contained in:
Vadim Kurland 2011-04-28 20:58:22 -07:00
parent 5a7646ebd9
commit beafb18186
13 changed files with 1147 additions and 2255 deletions

View File

@ -483,6 +483,7 @@ void PolicyRule::setTagObject(FWObject *tag_object)
string tag_id =
(tag_object) ? FWObjectDatabase::getStringId(tag_object->getId()) : "";
getOptionsObject()->setStr("tagobject_id", tag_id);
setTagging(tag_object && ! tag_id.empty());
}
FWObject* PolicyRule::getTagObject()

View File

@ -74,38 +74,16 @@ ActionsDialog::ActionsDialog(QWidget *parent) : BaseObjectDialog(parent)
//m_dialog->iptBranchDropArea->addAcceptedTypes("NAT");
//m_dialog->iptBranchDropArea->addAcceptedTypes("Routing");
m_dialog->iptBranchDropArea->setHelperText("Drop rule set object here");
connect (m_dialog->iptBranchDropArea,
SIGNAL(objectDeleted()),this,SLOT(changed()));
connect (m_dialog->iptBranchDropArea,
SIGNAL(objectInserted()),this,SLOT(changed()));
m_dialog->pfBranchDropArea->addAcceptedTypes("Policy");
//m_dialog->pfBranchDropArea->addAcceptedTypes("NAT");
//m_dialog->pfBranchDropArea->addAcceptedTypes("Routing");
m_dialog->pfBranchDropArea->setHelperText("Drop rule set object here");
connect (m_dialog->pfBranchDropArea,
SIGNAL(objectDeleted()),this,SLOT(changed()));
connect (m_dialog->pfBranchDropArea,
SIGNAL(objectInserted()),this,SLOT(changed()));
m_dialog->natBranchDropArea->addAcceptedTypes("NAT");
m_dialog->natBranchDropArea->setHelperText("Drop NAT rule set object here");
connect (m_dialog->natBranchDropArea,
SIGNAL(objectDeleted()),this,SLOT(changed()));
connect (m_dialog->natBranchDropArea,
SIGNAL(objectInserted()),this,SLOT(changed()));
m_dialog->pfTagDropArea->addAcceptedTypes("TagService");
connect (m_dialog->pfTagDropArea,
SIGNAL(objectDeleted()),this,SLOT(changed()));
connect (m_dialog->pfTagDropArea,
SIGNAL(objectInserted()),this,SLOT(changed()));
m_dialog->iptTagDropArea->addAcceptedTypes("TagService");
connect (m_dialog->iptTagDropArea,
SIGNAL(objectDeleted()),this,SLOT(changed()));
connect (m_dialog->iptTagDropArea,
SIGNAL(objectInserted()),this,SLOT(changed()));
connectSignalsOfAllWidgetsToSlotChange();
};
ActionsDialog::~ActionsDialog()
@ -183,21 +161,6 @@ void ActionsDialog::applyChanges()
data.saveAll(new_rule_options);
Rule *rule = Rule::cast(new_state);
PolicyRule *policy_rule = PolicyRule::cast(new_state);
if (editor=="TagIptables")
{
FWObject *tag_object = m_dialog->iptTagDropArea->getObject();
// if tag_object==NULL, setTagObject clears setting in the rule
policy_rule->setTagObject(tag_object);
}
if (editor=="TagPF")
{
FWObject *tag_object = m_dialog->pfTagDropArea->getObject();
// if tag_object==NULL, setTagObject clears setting in the rule
policy_rule->setTagObject(tag_object);
}
if (editor=="BranchChain")
{
@ -220,39 +183,21 @@ void ActionsDialog::applyChanges()
rule->setBranch(ruleset);
}
if (m_dialog->useDummyNetPipe->isChecked())
new_rule_options->setInt("ipfw_classify_method", DUMMYNETPIPE);
else
new_rule_options->setInt("ipfw_classify_method", DUMMYNETQUEUE);
if (!cmd->getOldState()->cmp(new_state, true))
m_project->undoStack->push(cmd.release());
}
void ActionsDialog::tagvalueChanged(int)
{
QString buf;
// QString buf;
//!!! buf.setNum(m_dialog->tagvalue_int->value());
//!!! m_dialog->tagvalue_str->setText(buf);
}
void ActionsDialog::iptRouteContinueToggled()
{
if (m_dialog->ipt_continue->isChecked())
{
m_dialog->ipt_iif->setCurrentIndex(0);
m_dialog->ipt_tee->setChecked(false);
}
m_dialog->ipt_iif->setEnabled( ! m_dialog->ipt_continue->isChecked() );
m_dialog->ipt_tee->setEnabled( ! m_dialog->ipt_continue->isChecked() );
}
void ActionsDialog::setRule(Rule *r)
{
rule = r;
PolicyRule *policy_rule = PolicyRule::cast(r);
FWObject *o = r;
while (o!=NULL && Firewall::cast(o)==NULL) o = o->getParent();
@ -266,11 +211,6 @@ void ActionsDialog::setRule(Rule *r)
if (firewall)
{
// firewall can be NULL if rule set is in Deleted Objects library
fillInterfaces(m_dialog->ipt_iif);
fillInterfaces(m_dialog->ipt_oif);
fillInterfaces(m_dialog->ipf_route_opt_if);
fillInterfaces(m_dialog->pf_route_opt_if);
platform = firewall->getStr("platform");
help_name = string(platform + "_" + act).c_str();
editor = DialogFactory::getActionDialogPageName(firewall, r);
@ -287,102 +227,13 @@ void ActionsDialog::setRule(Rule *r)
branchNameInput = NULL;
if (ropt->getInt("ipfw_classify_method") == DUMMYNETPIPE)
{
m_dialog->useDummyNetPipe->setChecked(1);
} else {
m_dialog->useDummyNetQueue->setChecked(1);
}
// as of 4.2.0 build 3477 we provide checkboxes to make Tag and
// Classify actions (PF) terminating or non-terminating on
// per-rule basis. Old behavior: Tag was non-terminating and
// Classify was terminating. Set options accordingly if they are
// not set.
if (platform=="pf")
{
string pf_tag_terminating = ropt->getStr("pf_tag_terminating");
if (pf_tag_terminating.empty())
ropt->setBool("pf_tag_terminating", false);
string pf_classify_terminating = ropt->getStr("pf_classify_terminating");
if (pf_classify_terminating.empty())
ropt->setBool("pf_classify_terminating", true);
}
if (platform=="iptables")
{
m_dialog->classify_terminating->show();
m_dialog->tag_terminating->show();
// Keep both variants of this text separate to simplify localization
QString emu_state;
if (firewall->getOptionsObject()->getBool("classify_mark_terminating"))
{
emu_state =
tr("Emulation of terminating behavior for MARK and CLASSIFY "
"targets is currently ON, rule will be terminating");
} else
{
emu_state =
tr("Emulation of terminating behavior for MARK and CLASSIFY "
"targets is currently OFF, rule will not be terminating");
}
m_dialog->classify_terminating->setText(emu_state);
m_dialog->tag_terminating->setText(emu_state);
} else
{
m_dialog->classify_terminating->hide();
m_dialog->tag_terminating->hide();
}
data.clear();
data.registerOption(m_dialog->ipt_mark_connections, ropt,
"ipt_mark_connections");
data.registerOption(m_dialog->pf_tag_terminating, ropt, "pf_tag_terminating");
// data.registerOption(ipt_mark_prerouting, ropt, "ipt_mark_prerouting");
data.registerOption(m_dialog->accountingvalue_str, ropt,
"rule_name_accounting");
data.registerOption(m_dialog->usePortNum, ropt, "ipfw_pipe_queue_num");
data.registerOption(m_dialog->divertPortNum, ropt, "ipfw_pipe_port_num");
data.registerOption(m_dialog->classify_str, ropt, "classify_str");
data.registerOption(m_dialog->custom_str, ropt, "custom_str");
data.registerOption(m_dialog->pf_classify_str, ropt, "pf_classify_str");
data.registerOption(m_dialog->pf_classify_terminating, ropt,
"pf_classify_terminating");
// ROUTE action:
// build a map for combobox so visible combobox items can be localized
QStringList route_options = getRouteOptions_pf_ipf(platform.c_str() );
QStringList route_load_options = getRouteLoadOptions_pf(platform.c_str() );
// iptables
data.registerOption(m_dialog->ipt_iif, ropt, "ipt_iif" );
data.registerOption(m_dialog->ipt_oif, ropt, "ipt_oif" );
data.registerOption(m_dialog->ipt_gw, ropt, "ipt_gw" );
data.registerOption(m_dialog->ipt_continue, ropt, "ipt_continue" );
data.registerOption(m_dialog->ipt_tee, ropt, "ipt_tee");
// ipfilter
data.registerOption(m_dialog->ipf_route_option, ropt, "ipf_route_option",
route_options);
data.registerOption(m_dialog->ipf_route_opt_if, ropt, "ipf_route_opt_if");
data.registerOption(m_dialog->ipf_route_opt_addr, ropt,
"ipf_route_opt_addr");
// pf
data.registerOption(m_dialog->pf_fastroute, ropt, "pf_fastroute" );
data.registerOption(m_dialog->pf_route_load_option, ropt,
"pf_route_load_option", route_load_options );
data.registerOption(m_dialog->pf_route_option, ropt, "pf_route_option",
route_options);
data.registerOption(m_dialog->pf_route_opt_if, ropt, "pf_route_opt_if" );
data.registerOption(m_dialog->pf_route_opt_addr, ropt, "pf_route_opt_addr");
// REJECT action:
data.registerOption(m_dialog->rejectvalue, ropt, "action_on_reject");
@ -392,40 +243,14 @@ void ActionsDialog::setRule(Rule *r)
{
w=m_dialog->RejectPage;
}
else if (editor=="TagIptables")
{
w = m_dialog->TagIptables;
FWObject *o = policy_rule->getTagObject();
m_dialog->iptTagDropArea->setObject(o);
m_dialog->iptTagDropArea->update();
}
else if (editor=="TagPF")
{
w = m_dialog->TagPF;
FWObject *o = policy_rule->getTagObject();
m_dialog->pfTagDropArea->setObject(o);
m_dialog->pfTagDropArea->update();
}
else if (editor=="AccountingStr")
{
w = m_dialog->AccountingStrPage;
}
else if (editor=="ClassifyArgsIPFW")
{
w = m_dialog->ClassifyArgsIPFW;
}
else if (editor=="PipeArgsIPFW")
{
w = m_dialog->PipeArgsIPFW;
}
else if (editor=="ClassifyIptables")
{
w = m_dialog->ClassifyIptables;
}
else if (editor=="ClassifyPF")
{
w = m_dialog->ClassifyPF;
}
else if (editor=="CustomStr")
{
w = m_dialog->CustomStrPage;
@ -451,41 +276,10 @@ void ActionsDialog::setRule(Rule *r)
RuleSet *ruleset = r->getBranch();
m_dialog->natBranchDropArea->setObject(ruleset);
}
else if (editor=="RouteIPT")
{
w=m_dialog->RouteIPTPage;
}
else if (editor=="RouteIPF")
{
w=m_dialog->RouteIPFPage;
}
else if (editor=="RoutePF")
{
w=m_dialog->RoutePFPage;
}
m_dialog->widgetStack->setCurrentWidget(w);
//rejectvalue->setCurrentText(ropt->getStr("action_on_reject") );
data.loadAll();
iptRouteContinueToggled();
}
void ActionsDialog::fillInterfaces(QComboBox* cb)
{
cb->clear();
cb->addItem("");
list<FWObject*> interfaces = firewall->getByTypeDeep(Interface::TYPENAME);
for (list<FWObject*>::iterator i=interfaces.begin(); i!=interfaces.end(); ++i)
{
Interface *iface = Interface::cast(*i);
assert(iface);
cb->addItem(iface->getName().c_str());
}
}

View File

@ -73,13 +73,10 @@ private:
ActionsDialog(QWidget *parent);
~ActionsDialog();
void fillInterfaces(QComboBox *);
public slots:
virtual void applyChanges();
virtual void tagvalueChanged(int);
virtual void iptRouteContinueToggled();
virtual void loadFWObject(libfwbuilder::FWObject *obj);
virtual void validate(bool*);
virtual void getHelpName(QString*);

View File

@ -46,17 +46,7 @@ protected:
public slots:
virtual void changed()
{
QWidget *s = dynamic_cast<QWidget*>(sender());
if (fwbdebug)
qDebug() << "BaseObjectDialog::changed() from " << s;
if (!init)
{
emit changed_sign();
}
}
virtual void changed();
public:
BaseObjectDialog(QWidget *parent) : QWidget(parent)
@ -70,6 +60,8 @@ public:
void attachToProjectWindow(ProjectPanel *pp) { m_project = pp; }
ProjectPanel* getAssociatedProjectWindow() { return m_project; }
void connectSignalsOfAllWidgetsToSlotChange();
signals:
void changed_sign();

View File

@ -945,21 +945,6 @@ QString FWObjectPropertiesFactory::getRuleActionProperties(Rule *rule)
case PolicyRule::Reject:
par = ropt->getStr("action_on_reject").c_str();
break;
/*
* TODO #2367 This should move to getPolicyRuleOptions()
*
case PolicyRule::Tag:
{
FWObject *tag_object = PolicyRule::cast(rule)->getTagObject();
if (tag_object)
par = QString::fromUtf8(tag_object->getName().c_str());
else
par = QString::fromUtf8(PolicyRule::cast(rule)->getTagValue().c_str());
break;
}
*/
case PolicyRule::Accounting :
par = ropt->getStr("rule_name_accounting").c_str();
break;
@ -974,30 +959,6 @@ QString FWObjectPropertiesFactory::getRuleActionProperties(Rule *rule)
// ropt->getStr("branch_name").c_str();
break;
}
/*
* TODO #2367 This should move to getPolicyRuleOptions()
*
case PolicyRule::Classify:
if (platform=="ipfw")
{
if (ropt->getInt("ipfw_classify_method") == DUMMYNETPIPE)
{
par = "pipe";
} else {
par = "queue";
}
par = par + " " + ropt->getStr("ipfw_pipe_queue_num").c_str();
} else
{
if (platform=="pf")
par = ropt->getStr("pf_classify_str").c_str();
else
par = ropt->getStr("classify_str").c_str();
}
break;
*/
case PolicyRule::Pipe :
if (platform=="ipfw")
{
@ -1006,48 +967,6 @@ QString FWObjectPropertiesFactory::getRuleActionProperties(Rule *rule)
}
break;
/*
* TODO #2367 This should move to getPolicyRuleOptions()
*
case PolicyRule::Route :
if (platform=="iptables")
{
string a;
a = ropt->getStr("ipt_gw");
if (!a.empty()) par = par + " gw: " + a.c_str();
a = ropt->getStr("ipt_iif");
if (!a.empty()) par = par + " iif: " + a.c_str();
a = ropt->getStr("ipt_oif");
if (!a.empty()) par = par + " oif: " + a.c_str();
}
if (platform=="ipf")
{
string a;
a = ropt->getStr("ipf_route_option");
if (!a.empty())
{
par = par + " "+
getScreenName(a.c_str(),
getRouteOptions_pf_ipf( platform.c_str() ));
}
a = ropt->getStr("ipf_route_opt_if");
if (!a.empty()) par = par + " "+ a.c_str();
a = ropt->getStr("ipf_route_opt_addr");
if (!a.empty()) par = par + " "+ a.c_str();
}
if (platform=="pf")
{
string a;
a = ropt->getStr("pf_route_option");
if (!a.empty()) par = par + " "+ a.c_str();
a = ropt->getStr("pf_route_opt_if");
if (!a.empty()) par = par + " "+ a.c_str();
a = ropt->getStr("pf_route_opt_addr");
if (!a.empty()) par = par + " "+ a.c_str();
}
break;
*/
default : {}
}
}

View File

@ -25,6 +25,7 @@
#include "../../config.h"
#include "../../definitions.h"
#include "global.h"
#include "utils.h"
#include "platforms.h"
@ -33,6 +34,7 @@
#include "RuleSetView.h"
#include "FWWindow.h"
#include "FWCmdRule.h"
#include "FWObjectDropArea.h"
#include "fwbuilder/Firewall.h"
#include "fwbuilder/Rule.h"
@ -44,15 +46,17 @@
#include <memory>
#include <qstackedwidget.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qlabel.h>
#include <QSpinBox>
#include <QLineEdit>
#include <QComboBox>
#include <QCheckBox>
#include <QObject>
#include <iostream>
@ -70,6 +74,12 @@ RuleOptionsDialog::RuleOptionsDialog(QWidget *parent) :
m_dialog = new Ui::RuleOptionsDialog_q;
m_dialog->setupUi(this);
m_dialog->pfTagDropArea->addAcceptedTypes("TagService");
m_dialog->iptTagDropArea->addAcceptedTypes("TagService");
connectSignalsOfAllWidgetsToSlotChange();
firewall = NULL;
init=false;
}
@ -81,23 +91,22 @@ void RuleOptionsDialog::getHelpName(QString *str)
void RuleOptionsDialog::loadFWObject(FWObject *o)
{
obj=o;
// rsv=rv;
FWObject *p=obj;
obj = o;
firewall = o;
// use Firewall::cast to match both Firewall and Cluster
while (!Firewall::cast(p)) p = p->getParent();
platform=p->getStr("platform").c_str();
while (!Firewall::cast(firewall)) firewall = firewall->getParent();
platform = firewall->getStr("platform").c_str();
string version = firewall->getStr("version");
help_name = platform + "_rule_options";
// build a map for combobox so visible combobox items can be localized
QStringList route_options = getRouteOptions_pf_ipf(platform);
QStringList route_load_options = getRouteLoadOptions_pf(platform);
Rule *rule = dynamic_cast<Rule*>(o);
FWOptions *ropt = rule->getOptionsObject();
// m_dialog->editorTitle->setText(QString("%1 / %2 / %3 ")
// .arg(QString::fromUtf8(p->getName().c_str()))
// .arg(rule->getTypeName().c_str())
// .arg(rule->getPosition()));
PolicyRule *policy_rule = PolicyRule::cast(rule);
int wid=0;
if (platform=="iptables") wid=0;
@ -128,6 +137,12 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
m_dialog->ipt_hashlimit_suffix->clear();
m_dialog->ipt_hashlimit_suffix->addItems(getScreenNames(limitSuffixes));
fillInterfaces(m_dialog->ipt_iif);
fillInterfaces(m_dialog->ipt_oif);
fillInterfaces(m_dialog->ipf_route_opt_if);
fillInterfaces(m_dialog->pf_route_opt_if);
data.clear();
if (platform=="iptables")
@ -192,8 +207,25 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
threeStateMapping.push_back("0");
data.registerOption(m_dialog->ipt_assume_fw_is_part_of_any, ropt,
"firewall_is_part_of_any_and_networks", threeStateMapping);
"firewall_is_part_of_any_and_networks",
threeStateMapping);
data.registerOption(m_dialog->ipt_stateless, ropt, "stateless");
data.registerOption(m_dialog->ipt_mark_connections, ropt,
"ipt_mark_connections");
data.registerOption(m_dialog->classify_str, ropt, "classify_str");
// Route
data.registerOption(m_dialog->ipt_iif, ropt, "ipt_iif" );
data.registerOption(m_dialog->ipt_oif, ropt, "ipt_oif" );
data.registerOption(m_dialog->ipt_gw, ropt, "ipt_gw" );
data.registerOption(m_dialog->ipt_continue, ropt, "ipt_continue" );
data.registerOption(m_dialog->ipt_tee, ropt, "ipt_tee");
FWObject *o = policy_rule->getTagObject();
m_dialog->iptTagDropArea->setObject(o);
m_dialog->iptTagDropArea->update();
}
@ -207,12 +239,17 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
"ipf_return_icmp_as_dest");
data.registerOption(m_dialog->ipf_stateless, ropt, "stateless");
data.registerOption(m_dialog->ipf_keep_frags, ropt, "ipf_keep_frags");
// Route
data.registerOption(m_dialog->ipf_route_option, ropt, "ipf_route_option",
route_options);
data.registerOption(m_dialog->ipf_route_opt_if, ropt, "ipf_route_opt_if");
data.registerOption(m_dialog->ipf_route_opt_addr, ropt,
"ipf_route_opt_addr");
}
if (platform=="pf")
{
string version = p->getStr("version");
bool ge_4_5 = XMLTools::version_compare(version, "4.5")>=0;
m_dialog->pf_no_sync->setEnabled(ge_4_5);
@ -254,11 +291,38 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
"pf_modulate_state");
data.registerOption(m_dialog->pf_synproxy, ropt,
"pf_synproxy");
data.registerOption(m_dialog->pf_classify_str, ropt, "pf_classify_str");
// Route
data.registerOption(m_dialog->pf_fastroute, ropt, "pf_fastroute");
data.registerOption(m_dialog->pf_route_load_option, ropt,
"pf_route_load_option", route_load_options);
data.registerOption(m_dialog->pf_route_option, ropt, "pf_route_option",
route_options);
data.registerOption(m_dialog->pf_route_opt_if, ropt, "pf_route_opt_if");
data.registerOption(m_dialog->pf_route_opt_addr, ropt, "pf_route_opt_addr");
FWObject *o = policy_rule->getTagObject();
m_dialog->pfTagDropArea->setObject(o);
m_dialog->pfTagDropArea->update();
}
if (platform=="ipfw")
{
data.registerOption(m_dialog->ipfw_stateless, ropt,"stateless");
data.registerOption(m_dialog->usePortNum, ropt, "ipfw_pipe_queue_num");
/* #2367 */
data.registerOption(m_dialog->ipfw_classify, ropt, "classification");
if (ropt->getInt("ipfw_classify_method") == DUMMYNETPIPE)
{
m_dialog->useDummyNetPipe->setChecked(1);
} else {
m_dialog->useDummyNetQueue->setChecked(1);
}
}
if (platform=="iosacl" || platform=="procurve_acl")
@ -269,9 +333,10 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
if (platform=="pix" || platform=="fwsm")
{
string vers="version_"+p->getStr("version");
string vers = "version_" + version;
if (Resources::platform_res[platform.toAscii().constData()]->getResourceBool(
"/FWBuilderResources/Target/options/"+vers+"/pix_rule_syslog_settings"))
"/FWBuilderResources/Target/options/" +
vers + "/pix_rule_syslog_settings"))
{
m_dialog->pix_disable_rule_log->setEnabled(true);
m_dialog->pix_logLevel->setEnabled(true);
@ -292,7 +357,9 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
}
init=true;
init = true;
data.loadAll();
m_dialog->pf_max_src_nodes->setEnabled(
@ -300,6 +367,7 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
m_dialog->pf_max_src_states->setEnabled(
m_dialog->pf_source_tracking->isChecked());
connlimitAboveLabelChange();
limitLabelChange();
@ -326,6 +394,8 @@ void RuleOptionsDialog::changed()
m_dialog->pf_flush->setEnabled(enable_overload_options);
m_dialog->pf_global->setEnabled(enable_overload_options);
iptRouteContinueToggled(); // #2367
BaseObjectDialog::changed();
}
@ -342,9 +412,65 @@ void RuleOptionsDialog::applyChanges()
FWObject* new_state = cmd->getNewState();
FWOptions* new_rule_options = Rule::cast(new_state)->getOptionsObject();
init=true;
init = true;
data.saveAll(new_rule_options);
init=false;
init = false;
/* #2367 */
PolicyRule *policy_rule = PolicyRule::cast(new_state);
if (policy_rule)
{
FWOptions *ropt = policy_rule->getOptionsObject();
if (platform=="iptables")
{
FWObject *tag_object = m_dialog->iptTagDropArea->getObject();
// if tag_object==NULL, setTagObject clears setting in the rule
policy_rule->setTagging(tag_object != NULL);
policy_rule->setTagObject(tag_object);
policy_rule->setClassification(
! ropt->getStr("classify_str").empty());
policy_rule->setRouting( ! ropt->getStr("ipt_iif").empty() ||
! ropt->getStr("ipt_oif").empty() ||
! ropt->getStr("ipt_gw").empty());
}
if (platform=="pf")
{
FWObject *tag_object = m_dialog->pfTagDropArea->getObject();
// if tag_object==NULL, setTagObject clears setting in the rule
policy_rule->setTagging(tag_object != NULL);
policy_rule->setTagObject(tag_object);
policy_rule->setClassification(
! ropt->getStr("pf_classify_str").empty());
policy_rule->setRouting(
! ropt->getStr("pf_route_option").empty() &&
ropt->getStr("pf_route_option") != "none");
}
if (platform=="ipf")
{
policy_rule->setRouting(
! ropt->getStr("ipf_route_option").empty() &&
ropt->getStr("ipf_route_option") != "none");
}
if (platform=="ipfw")
{
// rule option "classification" is set via checkbox and was
// set by the call to data.saveAll() above
if (m_dialog->useDummyNetPipe->isChecked())
new_rule_options->setInt("ipfw_classify_method", DUMMYNETPIPE);
else
new_rule_options->setInt("ipfw_classify_method", DUMMYNETQUEUE);
}
}
if (!cmd->getOldState()->cmp(new_state, true))
{
@ -388,3 +514,31 @@ void RuleOptionsDialog::limitLabelChange()
changed();
}
void RuleOptionsDialog::iptRouteContinueToggled()
{
if (m_dialog->ipt_continue->isChecked())
{
m_dialog->ipt_iif->setCurrentIndex(0);
m_dialog->ipt_tee->setChecked(false);
}
m_dialog->ipt_iif->setEnabled( ! m_dialog->ipt_continue->isChecked() );
m_dialog->ipt_tee->setEnabled( ! m_dialog->ipt_continue->isChecked() );
}
void RuleOptionsDialog::fillInterfaces(QComboBox* cb)
{
cb->clear();
cb->addItem("");
list<FWObject*> interfaces = firewall->getByTypeDeep(Interface::TYPENAME);
for (list<FWObject*>::iterator i=interfaces.begin(); i!=interfaces.end(); ++i)
{
Interface *iface = Interface::cast(*i);
assert(iface);
cb->addItem(iface->getName().c_str());
}
}

View File

@ -45,15 +45,19 @@ class RuleOptionsDialog : public BaseObjectDialog
DialogData data;
QString platform;
RuleSetView *rsv;
Ui::RuleOptionsDialog_q*m_dialog;
libfwbuilder::FWObject *firewall;
QString help_name;
public:
RuleOptionsDialog(QWidget *parent);
~RuleOptionsDialog();
void fillInterfaces(QComboBox *); // #2367
public slots:
virtual void changed();
virtual void applyChanges();
@ -63,6 +67,7 @@ public slots:
virtual void getHelpName(QString*);
virtual void connlimitAboveLabelChange();
virtual void limitLabelChange();
virtual void iptRouteContinueToggled(); // #2367
};
#endif // __RULEOPTIONSDIALOG_H

View File

@ -24,6 +24,7 @@
*/
#include "../../config.h"
#include "../../definitions.h"
#include "global.h"
#include "utils.h"
@ -1433,8 +1434,52 @@ QStringList PolicyModel::getRuleOptions(Rule* r) const
{
QStringList res;
PolicyRule *policyRule = PolicyRule::cast( r );
FWOptions *ropt = policyRule->getOptionsObject();
if (policyRule->getLogging()) res << "Log";
if (!isDefaultPolicyRuleOptions(r->getOptionsObject())) res << "Options";
if ( ! isDefaultPolicyRuleOptions(r->getOptionsObject())) res << "Options";
FWObject *firewall = r;
// use Firewall::cast to match both Firewall and Cluster
while (!Firewall::cast(firewall)) firewall = firewall->getParent();
string platform = firewall->getStr("platform");
if (policyRule->getTagging())
{
res << tr("Tag %1").arg(
QString::fromUtf8(
PolicyRule::cast(policyRule)->getTagValue().c_str()));
}
if (policyRule->getClassification())
{
QString par;
if (platform=="iptables")
par = ropt->getStr("classify_str").c_str();
if (platform=="pf")
par = ropt->getStr("pf_classify_str").c_str();
if (platform=="ipfw")
{
if (ropt->getInt("ipfw_classify_method") == DUMMYNETPIPE)
{
par = "pipe";
} else {
par = "queue";
}
par = par + " " + ropt->getStr("ipfw_pipe_queue_num").c_str();
}
if (!par.isEmpty()) res << tr("Classify %1").arg(par);
}
if (policyRule->getRouting())
{
res << "Route";
}
return res;
}

View File

@ -257,6 +257,9 @@ void RuleSetViewDelegate::paintOptions(QPainter *painter, const QStyleOptionView
{
if (icons[i].contains("Log")) text.push_back(tr("log"));
if (icons[i].contains("Options")) text.push_back(tr("(options)"));
if (icons[i].contains("Tag")) text.push_back(icons[i]);
if (icons[i].contains("Class")) text.push_back(icons[i]);
if (icons[i].contains("Routing")) text.push_back(icons[i]);
}
drawIconAndText(painter, ctx.drawRect, "", text.join(", "), false);
}

View File

@ -38,79 +38,8 @@
<enum>QFrame::Plain</enum>
</property>
<property name="currentIndex">
<number>8</number>
<number>5</number>
</property>
<widget class="QWidget" name="TagPF">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="textLabel4">
<property name="text">
<string>Tag service object:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="FWObjectDropArea" name="pfTagDropArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>80</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="pf_tag_terminating">
<property name="text">
<string>Make this rule terminating</string>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>691</width>
<height>58</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="RejectPage">
<layout class="QGridLayout">
<property name="margin">
@ -215,107 +144,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="TagIptables">
<layout class="QGridLayout">
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="textLabel4_2">
<property name="text">
<string>Tag service object:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>201</width>
<height>81</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" rowspan="3">
<widget class="FWObjectDropArea" name="iptTagDropArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>80</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="ipt_mark_connections">
<property name="toolTip">
<string>Requires CONNMARK target</string>
</property>
<property name="text">
<string>Tag connections created by packets that match this rule</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="tag_terminating">
<property name="toolTip">
<string>Note: this action translates into MARK target for iptables.
Normally this target is non-terminating, that is, other rules
with Classify or Tag actions below this one will process
the same packet. However, Firewall Builder can emulate
terminating behavior for this action. Option in the &quot;compiler&quot;
tab of the firewall object properties dialog activates emulation.</string>
</property>
<property name="text">
<string>Emulation of terminating behavior for MARK target is currently ON, the rule will be terminating</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>609</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="AccountingStrPage">
<layout class="QGridLayout">
<property name="margin">
@ -358,113 +186,6 @@ tab of the firewall object properties dialog activates emulation.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="ClassifyArgsIPFW">
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="textLabel1">
<property name="text">
<string>Packet classification can be implemented in different ways:</string>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QGroupBox" name="buttonGroup1">
<property name="title">
<string/>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="1" column="0">
<widget class="QRadioButton" name="useDummyNetPipe">
<property name="text">
<string>use dummynet(4) 'pipe'</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="useDummyNetQueue">
<property name="text">
<string>use dummynet(4) 'queue'</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel2_2">
<property name="text">
<string>Pipe or queue number:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="usePortNum">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximum">
<number>999999</number>
</property>
</widget>
</item>
<item row="3" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="CustomStrPage">
<layout class="QVBoxLayout">
<property name="spacing">
@ -504,104 +225,6 @@ tab of the firewall object properties dialog activates emulation.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="ClassifyIptables">
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel2_3">
<property name="text">
<string>Classify string:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="classify_str"/>
</item>
<item row="4" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="classify_terminating">
<property name="toolTip">
<string>Note: CLASSIFY target in iptables is non-terminating,
this means other rules with Classify or Branch
target below this one will process the same packet.
However, Firewall Builder can emulate terminating
behavior for this action. Emulation is activated
by an option in the &quot;compiler&quot; tab of the firewall
object properties dialog.</string>
</property>
<property name="text">
<string>Emulation is currently ON, rule will be terminating</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="ClassifyPF">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="textLabel2_6">
<property name="text">
<string>Classify string:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="pf_classify_str"/>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="pf_classify_terminating">
<property name="text">
<string>Make this rule terminating</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>93</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="PipeArgsIPFW">
<layout class="QGridLayout">
<property name="margin">
@ -808,321 +431,6 @@ object properties dialog.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="RouteIPFPage">
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="2" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>12</number>
</property>
<property name="margin">
<number>12</number>
</property>
<item>
<widget class="QComboBox" name="ipf_route_option">
<item>
<property name="text">
<string>Route through</string>
</property>
</item>
<item>
<property name="text">
<string>Route reply through</string>
</property>
</item>
<item>
<property name="text">
<string>Route a copy through</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="textLabel3_2">
<property name="text">
<string>interface</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="ipf_route_opt_if"/>
</item>
<item>
<widget class="QLabel" name="textLabel4_4">
<property name="text">
<string>next hop</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="ipf_route_opt_addr"/>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="RoutePFPage">
<layout class="QGridLayout">
<property name="spacing">
<number>12</number>
</property>
<item row="1" column="0" colspan="5">
<layout class="QHBoxLayout">
<property name="spacing">
<number>12</number>
</property>
<property name="margin">
<number>12</number>
</property>
<item>
<widget class="QComboBox" name="pf_route_option">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Route through</string>
</property>
</item>
<item>
<property name="text">
<string>Route reply through</string>
</property>
</item>
<item>
<property name="text">
<string>Route a copy through</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="textLabel1_5">
<property name="text">
<string>interface</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="pf_route_opt_if"/>
</item>
<item>
<widget class="QLabel" name="textLabel2_5">
<property name="text">
<string>next hop</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pf_route_opt_addr"/>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="pf_fastroute">
<property name="text">
<string>Fastroute</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Load Balancing:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QComboBox" name="pf_route_load_option">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Bitmask</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
<item>
<property name="text">
<string>Source Hash</string>
</property>
</item>
<item>
<property name="text">
<string>Round Robin</string>
</property>
</item>
</widget>
</item>
<item row="2" column="4">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" colspan="5">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>553</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="RouteIPTPage">
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel4_3">
<property name="text">
<string>Change inbound interface to</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel6">
<property name="text">
<string>Route through gateway</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QLineEdit" name="ipt_gw"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel5_2">
<property name="text">
<string>Change outbound interface to</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="ipt_iif"/>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="ipt_oif"/>
</item>
<item row="0" column="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="ipt_continue">
<property name="text">
<string>Continue packet inspection</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QCheckBox" name="ipt_tee">
<property name="text">
<string>Make a copy</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="NATBranchPage">
<layout class="QGridLayout" name="gridLayout_2">
<property name="spacing">
@ -1204,54 +512,6 @@ object properties dialog.</string>
<include location="MainRes.qrc"/>
</resources>
<connections>
<connection>
<sender>usePortNum</sender>
<signal>valueChanged(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>196</x>
<y>222</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>useDummyNetQueue</sender>
<signal>toggled(bool)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>52</x>
<y>181</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>useDummyNetPipe</sender>
<signal>toggled(bool)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>52</x>
<y>164</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>rejectvalue</sender>
<signal>activated(QString)</signal>
@ -1268,182 +528,6 @@ object properties dialog.</string>
</hint>
</hints>
</connection>
<connection>
<sender>pf_route_option</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>57</x>
<y>206</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_route_opt_if</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>313</x>
<y>206</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_route_opt_addr</sender>
<signal>editingFinished()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>494</x>
<y>207</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_fastroute</sender>
<signal>stateChanged(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>55</x>
<y>243</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_tee</sender>
<signal>released()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_oif</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_mark_connections</sender>
<signal>toggled(bool)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_iif</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_gw</sender>
<signal>editingFinished()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_continue</sender>
<signal>stateChanged(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>iptRouteContinueToggled()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_continue</sender>
<signal>stateChanged(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_branch_in_mangle</sender>
<signal>toggled(bool)</signal>
@ -1460,54 +544,6 @@ object properties dialog.</string>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_route_option</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>45</x>
<y>221</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_route_opt_if</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>301</x>
<y>221</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_route_opt_addr</sender>
<signal>editingFinished()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>482</x>
<y>222</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>divertPortNum</sender>
<signal>valueChanged(int)</signal>
@ -1540,22 +576,6 @@ object properties dialog.</string>
</hint>
</hints>
</connection>
<connection>
<sender>classify_str</sender>
<signal>editingFinished()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>46</x>
<y>131</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>accountingvalue_str</sender>
<signal>editingFinished()</signal>
@ -1572,70 +592,6 @@ object properties dialog.</string>
</hint>
</hints>
</connection>
<connection>
<sender>pf_route_load_option</sender>
<signal>activated(int)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>338</x>
<y>233</y>
</hint>
<hint type="destinationlabel">
<x>317</x>
<y>177</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_tag_terminating</sender>
<signal>toggled(bool)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>238</x>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>425</x>
<y>114</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_classify_terminating</sender>
<signal>toggled(bool)</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>425</x>
<y>88</y>
</hint>
<hint type="destinationlabel">
<x>425</x>
<y>114</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_classify_str</sender>
<signal>editingFinished()</signal>
<receiver>ActionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>425</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>425</x>
<y>114</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>changed()</slot>

View File

@ -227,6 +227,7 @@ SOURCES += ProjectPanel.cpp \
ProjectPanel_events.cpp \
ProjectPanel_file_ops.cpp \
ProjectPanel_state_ops.cpp \
BaseObjectDialog.cpp \
FWWindow.cpp \
FWWindow_editor.cpp \
FWWindow_single_rule_compile.cpp \

View File

@ -41,7 +41,7 @@
<number>0</number>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="ipt">
<layout class="QGridLayout">
@ -63,20 +63,14 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>4</number>
<number>6</number>
</property>
<widget class="QWidget" name="tab1">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>12</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
@ -124,7 +118,7 @@
</property>
</spacer>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="textLabel7">
<property name="text">
<string>Normally policy compiler uses stateful inspection in each rule. Activating this option makes this rule stateless.</string>
@ -133,18 +127,18 @@
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="0">
<widget class="QCheckBox" name="ipt_stateless">
<property name="text">
<string>Stateless rule</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -324,6 +318,12 @@
<string>limit</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_10">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="8">
<widget class="QLabel" name="textLabel5">
<property name="text">
@ -493,6 +493,12 @@
<string>connlimit</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_9">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel3_4">
<property name="text">
@ -1062,6 +1068,255 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab6">
<attribute name="title">
<string>Tag</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="textLabel4_4">
<property name="text">
<string>Tag service object:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="3">
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>615</width>
<height>81</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" rowspan="2">
<widget class="FWObjectDropArea" name="iptTagDropArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>80</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="ipt_mark_connections">
<property name="toolTip">
<string>Requires CONNMARK target</string>
</property>
<property name="text">
<string>Tag connections created by packets that match this rule</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<spacer name="spacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>609</width>
<height>108</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab7_2">
<attribute name="title">
<string>Classify</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_12">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel2_6">
<property name="text">
<string>Classify string:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="classify_str"/>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>928</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2">
<spacer name="spacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1105</width>
<height>169</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Route</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_13">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel4_5">
<property name="text">
<string>Change inbound interface to</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="ipt_iif"/>
</item>
<item row="0" column="3" colspan="2">
<spacer name="spacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>809</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel5_6">
<property name="text">
<string>Change outbound interface to</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="ipt_oif"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel6_4">
<property name="text">
<string>Route through gateway</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QLineEdit" name="ipt_gw"/>
</item>
<item row="2" column="4">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>754</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="ipt_continue">
<property name="text">
<string>Continue packet inspection</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QCheckBox" name="ipt_tee">
<property name="text">
<string>Make a copy</string>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>96</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@ -1083,7 +1338,7 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab7">
<attribute name="title">
@ -1156,6 +1411,9 @@
<string>Logging</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
@ -1251,6 +1509,108 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_9">
<attribute name="title">
<string>Route</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_18">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="_4">
<property name="spacing">
<number>12</number>
</property>
<property name="margin">
<number>12</number>
</property>
<item>
<widget class="QComboBox" name="ipf_route_option">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Route through</string>
</property>
</item>
<item>
<property name="text">
<string>Route reply through</string>
</property>
</item>
<item>
<property name="text">
<string>Route a copy through</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="textLabel3_7">
<property name="text">
<string>interface</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="ipf_route_opt_if"/>
</item>
<item>
<widget class="QLabel" name="textLabel4_6">
<property name="text">
<string>next hop</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="ipf_route_opt_addr"/>
</item>
</layout>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>548</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="spacer_13">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>180</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@ -1275,19 +1635,31 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>6</number>
</property>
<widget class="QWidget" name="tab12">
<attribute name="title">
<string>State Tracking</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>12</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="horizontalSpacing">
<number>12</number>
</property>
<property name="verticalSpacing">
<number>9</number>
</property>
<item row="0" column="0" colspan="4">
<widget class="QCheckBox" name="pf_stateless">
<property name="text">
@ -1473,6 +1845,9 @@
<string>Limits</string>
</attribute>
<layout class="QGridLayout">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
@ -1713,6 +2088,9 @@
<string>TCP</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_122">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
@ -1752,6 +2130,305 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Tag</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_14">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel4">
<property name="text">
<string>Tag service object:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="FWObjectDropArea" name="pfTagDropArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>80</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="spacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>982</width>
<height>77</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<spacer name="spacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>108</width>
<height>112</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>Classify</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_15">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel2_8">
<property name="text">
<string>Classify string:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="pf_classify_str"/>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>948</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>948</width>
<height>169</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_6">
<attribute name="title">
<string>Route</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_16">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="5">
<layout class="QHBoxLayout" name="_2">
<property name="spacing">
<number>12</number>
</property>
<property name="margin">
<number>12</number>
</property>
<item>
<widget class="QComboBox" name="pf_route_option">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Route through</string>
</property>
</item>
<item>
<property name="text">
<string>Route reply through</string>
</property>
</item>
<item>
<property name="text">
<string>Route a copy through</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="textLabel1_8">
<property name="text">
<string>interface</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="pf_route_opt_if"/>
</item>
<item>
<widget class="QLabel" name="textLabel2_9">
<property name="text">
<string>next hop</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pf_route_opt_addr"/>
</item>
</layout>
</item>
<item row="0" column="5">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>537</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="pf_fastroute">
<property name="text">
<string>Fastroute</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="spacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Load Balancing:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QComboBox" name="pf_route_load_option">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Bitmask</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
<item>
<property name="text">
<string>Source Hash</string>
</property>
</item>
<item>
<property name="text">
<string>Round Robin</string>
</property>
</item>
</widget>
</item>
<item row="1" column="4" colspan="2">
<spacer name="spacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>665</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="5">
<spacer name="spacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>553</width>
<height>139</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@ -1765,57 +2442,211 @@
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QFrame" name="frame6_2_2_2">
<property name="frameShape">
<enum>QFrame::Box</enum>
<widget class="QTabWidget" name="tabWidget">
<property name="tabShape">
<enum>QTabWidget::Triangular</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
<property name="currentIndex">
<number>1</number>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="textLabel7_2_2_2">
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Normally policy compiler uses stateful inspection in each rule. Activating next option makes this rule stateless.</string>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ipfw_stateless">
<property name="text">
<string>Stateless rule</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
</item>
</layout>
<widget class="QWidget" name="tab_7">
<attribute name="title">
<string>State Tracking</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel7_2_2_2">
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Normally policy compiler uses stateful inspection in each rule. Activating next option makes this rule stateless.</string>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>446</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="ipfw_stateless">
<property name="text">
<string>Stateless rule</string>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="spacer_10">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>184</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_8">
<attribute name="title">
<string>Classify</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_17">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="ipfw_classify">
<property name="text">
<string>Classify packets</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="textLabel1_9">
<property name="text">
<string>Packet classification can be implemented in different ways:</string>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="buttonGroup1">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="_3">
<property name="margin">
<number>12</number>
</property>
<property name="spacing">
<number>12</number>
</property>
<item row="1" column="0">
<widget class="QRadioButton" name="useDummyNetPipe">
<property name="text">
<string>use dummynet(4) 'pipe'</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="useDummyNetQueue">
<property name="text">
<string>use dummynet(4) 'queue'</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>882</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="textLabel2_10">
<property name="text">
<string>Pipe or queue number:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="usePortNum">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximum">
<number>999999</number>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="spacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>882</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1">
<spacer name="spacer_11">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@ -2084,6 +2915,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>FWObjectDropArea</class>
<extends>QWidget</extends>
<header>FWObjectDropArea.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>pix_disable_rule_log</tabstop>
<tabstop>pix_logLevel</tabstop>
@ -2124,813 +2963,12 @@
<tabstop>pf_global</tabstop>
<tabstop>pf_max_src_conn_rate_num</tabstop>
<tabstop>pf_max_src_conn_rate_seconds</tabstop>
<tabstop>ipfw_stateless</tabstop>
<tabstop>pf_logPrefix</tabstop>
</tabstops>
<resources>
<include location="MainRes.qrc"/>
</resources>
<connections>
<connection>
<sender>pf_max_src_states</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_max_src_nodes</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_source_tracking</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_rule_max_state</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>409</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pix_log_interval</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pix_logLevel</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pix_disable_rule_log</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_logPrefix</sender>
<signal>editingFinished()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipfw_stateless</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_stateless</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>79</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_masq_icmp</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_logLevel</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_logFacility</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipf_keep_frags</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>22</x>
<y>131</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_burst</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_connlimit</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_connlimit_masklen</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_limit</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_limitSuffix</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_logLevel</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_logPrefix</sender>
<signal>editingFinished()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_nlgroup</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_stateless</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>130</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit</sender>
<signal>valueChanged(QString)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>50</x>
<y>119</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_burst</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>295</x>
<y>119</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_dstlimit</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>26</x>
<y>93</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_suffix</sender>
<signal>activated(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>131</x>
<y>119</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_max_src_conn</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>409</x>
<y>80</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_flush</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>254</x>
<y>142</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_global</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>142</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_overload_table</sender>
<signal>editingFinished()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>115</x>
<y>142</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_max_src_conn_rate_num</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>409</x>
<y>111</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_max_src_conn_rate_seconds</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>524</x>
<y>111</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_expire</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>427</x>
<y>173</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_gcinterval</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>757</x>
<y>173</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_max</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>254</x>
<y>173</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_name</sender>
<signal>editingFinished()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>214</x>
<y>82</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_hashlimit_size</sender>
<signal>valueChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>91</x>
<y>173</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_srcip</sender>
<signal>released()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>462</x>
<y>124</y>
</hint>
<hint type="destinationlabel">
<x>460</x>
<y>-6</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_dstip</sender>
<signal>released()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>513</x>
<y>123</y>
</hint>
<hint type="destinationlabel">
<x>511</x>
<y>-3</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_srcport</sender>
<signal>released()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>589</x>
<y>126</y>
</hint>
<hint type="destinationlabel">
<x>579</x>
<y>-8</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_dstport</sender>
<signal>released()</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>651</x>
<y>124</y>
</hint>
<hint type="destinationlabel">
<x>642</x>
<y>-6</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_modulate</sender>
<signal>stateChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>561</x>
<y>81</y>
</hint>
<hint type="destinationlabel">
<x>561</x>
<y>115</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_synproxy</sender>
<signal>stateChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>561</x>
<y>105</y>
</hint>
<hint type="destinationlabel">
<x>561</x>
<y>115</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_sloppy_tracker</sender>
<signal>stateChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>565</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>561</x>
<y>142</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_assume_fw_is_part_of_any</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>528</x>
<y>70</y>
</hint>
<hint type="destinationlabel">
<x>561</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_stateless</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>570</x>
<y>97</y>
</hint>
<hint type="destinationlabel">
<x>567</x>
<y>162</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_keep_state</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>570</x>
<y>147</y>
</hint>
<hint type="destinationlabel">
<x>567</x>
<y>162</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_no_sync</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>570</x>
<y>127</y>
</hint>
<hint type="destinationlabel">
<x>567</x>
<y>162</y>
</hint>
</hints>
</connection>
<connection>
<sender>pf_pflow</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>570</x>
<y>153</y>
</hint>
<hint type="destinationlabel">
<x>567</x>
<y>162</y>
</hint>
</hints>
</connection>
<connection>
<sender>ipt_connlimit_above_not</sender>
<signal>clicked()</signal>
@ -2963,22 +3001,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>iosacl_add_mirror_rule</sender>
<signal>toggled(bool)</signal>
<receiver>RuleOptionsDialog_q</receiver>
<slot>changed()</slot>
<hints>
<hint type="sourcelabel">
<x>596</x>
<y>223</y>
</hint>
<hint type="destinationlabel">
<x>592</x>
<y>162</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>changed()</slot>

View File

@ -485,7 +485,10 @@ QPixmap LoadPixmap(const QString &path)
QString calculateIconName(const QString &_icn, bool negation)
{
QString icn = ":/Icons/" + _icn + "/icon";
// if _icn has white space, use only the first word
QStringList icnl = _icn.split(" ");
QString icn = ":/Icons/" + icnl[0] + "/icon";
if (negation)
{