Commit afd1c0fe authored by Ad Schellevis's avatar Ad Schellevis

(filter, plugin, pppoe) items->item

parent ffd39667
...@@ -1150,8 +1150,8 @@ function filter_nat_rules_automatic_tonathosts(&$FilterIflist, $with_descr = fal ...@@ -1150,8 +1150,8 @@ function filter_nat_rules_automatic_tonathosts(&$FilterIflist, $with_descr = fal
} }
/* PPPoE subnet */ /* PPPoE subnet */
if (isset($FilterIflist['pppoe']['items']) && is_array($FilterIflist['pppoe']['items'])) { if (isset($FilterIflist['pppoe']['item']) && is_array($FilterIflist['pppoe']['item'])) {
foreach ($FilterIflist['pppoe']['items'] as $pppoe) { foreach ($FilterIflist['pppoe']['item'] as $pppoe) {
if (is_private_ip($pppoe['ip'])) { if (is_private_ip($pppoe['ip'])) {
$tonathosts[] = "{$pppoe['sa']}/{$pppoe['sn']}"; $tonathosts[] = "{$pppoe['sa']}/{$pppoe['sn']}";
$descriptions[] = gettext("PPPoE server"); $descriptions[] = gettext("PPPoE server");
......
...@@ -696,15 +696,15 @@ function vpn_interface() ...@@ -696,15 +696,15 @@ function vpn_interface()
} }
if (isset($config['pppoes']['pppoe'])) { if (isset($config['pppoes']['pppoe'])) {
$pppoeifs = array('items' => array()); $pppoeifs = array('item' => array());
foreach($config['pppoes']['pppoe'] as $pppoe) { foreach($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") { if ($pppoe['mode'] == "server") {
$item = array('ip' => $pppoe['localip'], 'sa' => $pppoe['remoteip']); $item = array('ip' => $pppoe['localip'], 'sa' => $pppoe['remoteip']);
$item['sn'] = !empty($pppoe['pppoe_subnet']) ? $pppoe['pppoe_subnet'] : "32"; $item['sn'] = !empty($pppoe['pppoe_subnet']) ? $pppoe['pppoe_subnet'] : "32";
$pppoeifs['items'][] = $item; $pppoeifs['item'][] = $item;
} }
} }
if (count($pppoeifs['items'])) { if (count($pppoeifs['item'])) {
$pppoeifs['enable'] = true; $pppoeifs['enable'] = true;
$pppoeifs['if'] = 'pppoe'; $pppoeifs['if'] = 'pppoe';
$pppoeifs['descr'] = 'pppoe'; $pppoeifs['descr'] = 'pppoe';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment