summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-07-10 19:39:52 -0500
committerChris Buechler <cmb@pfsense.org>2016-07-10 19:39:52 -0500
commit9850771fd4759ae5211797605111d784a4d38868 (patch)
treebd1db441cab3a98076141efbfa5a85d73a7b7b91 /src/etc
parent497a03588393b1f5f19a7116679c04f639c75504 (diff)
parent48ebcd49eeb7e27b18c65d4eebf071d10e445654 (diff)
downloadpfsense-9850771fd4759ae5211797605111d784a4d38868.zip
pfsense-9850771fd4759ae5211797605111d784a4d38868.tar.gz
Merge pull request #3032 from NewEraCracker/patch-pppoe-rules
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/filter.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index 8976094..fe3bd1b 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -2570,6 +2570,7 @@ function filter_generate_address(& $rule, $target = "source", $isnat = false) {
$src = "(self)";
break;
case 'pppoe':
+ /* XXX: This needs to be fixed somehow! */
if (is_array($FilterIflist['pppoe'])) {
$pppoesav6 = gen_subnetv6($FilterIflist['pppoe'][0]['ipv6'], $FilterIflist['pppoe'][0]['snv6']);
$pppoesnv6 = $FilterIflist['pppoe'][0]['snv6'];
@@ -2609,7 +2610,7 @@ function filter_generate_address(& $rule, $target = "source", $isnat = false) {
case 'pppoe':
/* XXX: This needs to be fixed somehow! */
if (is_array($FilterIflist['pppoe'])) {
- $pppoesa = gen_subnet($FilterIflist['pppoe'][0]['ip'], $FilterIflist['pppoe'][0]['sn']);
+ $pppoesa = gen_subnet($FilterIflist['pppoe'][0]['sa'], $FilterIflist['pppoe'][0]['sn']);
$pppoesn = $FilterIflist['pppoe'][0]['sn'];
$src = "{$pppoesa}/{$pppoesn}";
}
@@ -2667,7 +2668,11 @@ function filter_generate_user_rule($rule) {
$ifliste = "";
foreach ($interfaces as $iface) {
if (array_key_exists($iface, $FilterIflist)) {
- $ifliste .= " " . $FilterIflist[$iface]['if'] . " ";
+ if (isset($FilterIflist[$iface]['if'])) {
+ $ifliste .= " " . $FilterIflist[$iface]['if'] . " ";
+ } else if (isset($FilterIflist[$iface][0]['if'])) {
+ $ifliste .= " " . $FilterIflist[$iface][0]['if'] . " ";
+ }
}
}
if ($ifliste <> "") {
@@ -4252,7 +4257,7 @@ function ifridx($if, $ridx) {
if ($ridx < 0) {
return $ridx;
}
-
+
$i = $ifridx = 0;
if (is_array($config['filter']['rule'])) {
foreach ($config['filter']['rule'] as $rulen => $filterent) {
OpenPOWER on IntegriCloud