mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
(filter, plugin, pppoe) items->item
This commit is contained in:
parent
ffd39667fd
commit
afd1c0fe7d
@ -1150,8 +1150,8 @@ function filter_nat_rules_automatic_tonathosts(&$FilterIflist, $with_descr = fal
|
||||
}
|
||||
|
||||
/* PPPoE subnet */
|
||||
if (isset($FilterIflist['pppoe']['items']) && is_array($FilterIflist['pppoe']['items'])) {
|
||||
foreach ($FilterIflist['pppoe']['items'] as $pppoe) {
|
||||
if (isset($FilterIflist['pppoe']['item']) && is_array($FilterIflist['pppoe']['item'])) {
|
||||
foreach ($FilterIflist['pppoe']['item'] as $pppoe) {
|
||||
if (is_private_ip($pppoe['ip'])) {
|
||||
$tonathosts[] = "{$pppoe['sa']}/{$pppoe['sn']}";
|
||||
$descriptions[] = gettext("PPPoE server");
|
||||
|
||||
@ -696,15 +696,15 @@ function vpn_interface()
|
||||
}
|
||||
|
||||
if (isset($config['pppoes']['pppoe'])) {
|
||||
$pppoeifs = array('items' => array());
|
||||
$pppoeifs = array('item' => array());
|
||||
foreach($config['pppoes']['pppoe'] as $pppoe) {
|
||||
if ($pppoe['mode'] == "server") {
|
||||
$item = array('ip' => $pppoe['localip'], 'sa' => $pppoe['remoteip']);
|
||||
$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['if'] = 'pppoe';
|
||||
$pppoeifs['descr'] = 'pppoe';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user