summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-11-23 22:52:20 +0000
committerErmal Luçi <eri@pfsense.org>2008-11-23 22:52:20 +0000
commiteefa2b49b0225384835e540201c5db44d487f7b0 (patch)
tree371dc616f1723fef65c6f0f4548135cfcc4c0cdf /etc
parentf699ed89d69a71658ff8e261ff4d3cf03b8b22ef (diff)
downloadpfsense-eefa2b49b0225384835e540201c5db44d487f7b0.zip
pfsense-eefa2b49b0225384835e540201c5db44d487f7b0.tar.gz
Remove hardcoded checks and substitute with more generic method.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index be08c30..f9332c8 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -252,7 +252,7 @@ function filter_generate_scrubing()
$scrubrules = "";
/* disable scrub option */
foreach ($FilterIflist as $scrubif => $scrubcfg) {
- if (in_array($scrubif, array("pppoe", "pptp", "enc0", "openvpn" /*, "lt2p", "ppp" */)))
+ if (isset($scrubcfg['virtual']))
continue;
/* set up MSS clamping */
if ($scrubcfg['mtu'] <> "" && is_numeric($scrubcfg['mtu']) && $scrubcfg['ip'] != "pppoe")
@@ -390,6 +390,7 @@ function generate_optcfg_array()
$oic['ip'] = $config['pptpd']['localip'];
$oc['sa'] = $config['pptpd']['remoteip'];
$oc['sn'] = $g['pptp_subnet'];
+ $oc['virtual'] = true;
if($config['pptpd']['pptp_subnet'] <> "")
$oc['sn'] = $config['pptpd']['pptp_subnet'];
$FilterIflist['pptp'] = $oic;
@@ -401,6 +402,7 @@ function generate_optcfg_array()
$oc['ip'] = $config['pppoe']['localip'];
$oc['sa'] = $config['pppoe']['remoteip'];
$oc['sn'] = $g['pppoe_subnet'];
+ $oc['virtual'] = true;
if($config['pppoe']['pppoe_subnet'] <> "")
$oc['sn'] = $config['pppoe']['pppoe_subnet'];
$FilterIflist['pppoe'] = $oic;
@@ -411,6 +413,7 @@ function generate_optcfg_array()
$oic['if'] = 'enc0';
$oic['descr'] = 'IPsec';
$oic['ip'] = "none";
+ $oc['virtual'] = true;
$FilterIflist['enc0'] = $oic;
}
/* add openvpn interfaces */
@@ -420,6 +423,7 @@ function generate_optcfg_array()
$oic['if'] = "openvpn";
$oic['descr'] = 'OpenVPN';
$oic['ip'] = "none";
+ $oc['virtual'] = true;
$FilterIflist['openvpn'] = $oic;
}
}
OpenPOWER on IntegriCloud