diff --git a/net/pppoe/Makefile b/net/pppoe/Makefile index 493f612f0..b90bb7ed9 100644 --- a/net/pppoe/Makefile +++ b/net/pppoe/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= pppoe PLUGIN_VERSION= 1.7 +PLUGIN_REVISION= 1 PLUGIN_DEPENDS= clog mpd5 PLUGIN_COMMENT= PPPoE server based on MPD5 PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net/pppoe/src/www/vpn_pppoe.php b/net/pppoe/src/www/vpn_pppoe.php index 2add77a8e..02bc17145 100644 --- a/net/pppoe/src/www/vpn_pppoe.php +++ b/net/pppoe/src/www/vpn_pppoe.php @@ -32,11 +32,7 @@ require_once("filter.inc"); require_once("plugins.inc.d/if_pppoe.inc"); require_once("interfaces.inc"); -if (empty($config['pppoes']['pppoe']) || !is_array($config['pppoes']['pppoe'])) { - $config['pppoes'] = array(); - $config['pppoes']['pppoe'] = array(); -} -$a_pppoes = &$config['pppoes']['pppoe']; +$a_pppoes = &config_read_array('pppoes', 'pppoe'); if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (!empty($_POST['apply'])) { diff --git a/net/pppoe/src/www/vpn_pppoe_edit.php b/net/pppoe/src/www/vpn_pppoe_edit.php index 28a79dfc5..994a34fa8 100644 --- a/net/pppoe/src/www/vpn_pppoe_edit.php +++ b/net/pppoe/src/www/vpn_pppoe_edit.php @@ -50,11 +50,7 @@ function vpn_pppoe_get_id() return $vpnid; } -if (empty($config['pppoes']['pppoe']) || !is_array($config['pppoes']['pppoe'])) { - $config['pppoes'] = array(); - $config['pppoes']['pppoe'] = array(); -} -$a_pppoes = &$config['pppoes']['pppoe']; +$a_pppoes = &config_read_array('pppoes', 'pppoe'); $copy_fields = array('remoteip', 'localip', 'mode', 'interface', 'n_pppoe_units', 'pppoe_subnet', 'dns1', 'dns2', 'descr', 'pppoeid');