From ab24e039190d4c0b85fd97908f919c5fff2e18ff Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 8 Aug 2016 09:17:01 +0200 Subject: [PATCH] net/*: adapt interface register to latest changes Also new instantly registers and removes legacy VPN interfaces like it should have. --- net/l2tp/Makefile | 1 + net/l2tp/src/www/vpn_l2tp.php | 1 + net/pppoe/Makefile | 1 + net/pppoe/src/www/vpn_pppoe.php | 4 ++-- net/pppoe/src/www/vpn_pppoe_edit.php | 2 ++ net/pptp/Makefile | 1 + net/pptp/src/www/vpn_pptp.php | 1 + 7 files changed, 9 insertions(+), 2 deletions(-) diff --git a/net/l2tp/Makefile b/net/l2tp/Makefile index 9a0bd86d9..ca867c084 100644 --- a/net/l2tp/Makefile +++ b/net/l2tp/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= l2tp PLUGIN_VERSION= 1.0 +PLUGIN_REVISION= 1 PLUGIN_DEPENDS= clog mpd5 PLUGIN_COMMENT= LT2P server based on MPD5 PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net/l2tp/src/www/vpn_l2tp.php b/net/l2tp/src/www/vpn_l2tp.php index 32df2e452..d18aaa4e4 100644 --- a/net/l2tp/src/www/vpn_l2tp.php +++ b/net/l2tp/src/www/vpn_l2tp.php @@ -149,6 +149,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { unset($l2tpcfg['radius']['radiusissueips']); } + plugins_interfaces(false); write_config(); if_l2tp_configure_do(); header("Location: vpn_l2tp.php"); diff --git a/net/pppoe/Makefile b/net/pppoe/Makefile index f10ff921f..7e5e621dd 100644 --- a/net/pppoe/Makefile +++ b/net/pppoe/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= pppoe PLUGIN_VERSION= 1.0 +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 8a152f7f8..806c7c038 100644 --- a/net/pppoe/src/www/vpn_pppoe.php +++ b/net/pppoe/src/www/vpn_pppoe.php @@ -29,6 +29,7 @@ require_once("guiconfig.inc"); require_once("filter.inc"); +require_once("plugins.inc"); require_once("plugins.inc.d/if_pppoe.inc"); require_once("interfaces.inc"); @@ -67,12 +68,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { killbypid("/var/run/pppoe{$a_pppoes[$_POST['id']]['pppoeid']}-vpn.pid"); mwexecf('/bin/rm -r %s', "/var/etc/pppoe{$a_pppoes[$_POST['id']]['pppoeid']}"); unset($a_pppoes[$_POST['id']]); + plugins_interfaces(false); write_config(); exit; } } - - } include("head.inc"); diff --git a/net/pppoe/src/www/vpn_pppoe_edit.php b/net/pppoe/src/www/vpn_pppoe_edit.php index aeb13234c..ce0e69523 100644 --- a/net/pppoe/src/www/vpn_pppoe_edit.php +++ b/net/pppoe/src/www/vpn_pppoe_edit.php @@ -30,6 +30,7 @@ require_once("guiconfig.inc"); require_once("interfaces.inc"); +require_once("plugins.inc"); function vpn_pppoe_get_id() { @@ -216,6 +217,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $a_pppoes[$id] = $pppoecfg; } + plugins_interfaces(false); write_config(); mark_subsystem_dirty('vpnpppoe'); file_put_contents('/tmp/.vpn_pppoe.apply', serialize($toapplylist)); diff --git a/net/pptp/Makefile b/net/pptp/Makefile index c32f03ece..9b18b6536 100644 --- a/net/pptp/Makefile +++ b/net/pptp/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= pptp PLUGIN_VERSION= 1.0 +PLUGIN_REVISION= 1 PLUGIN_DEPENDS= clog mpd5 PLUGIN_COMMENT= PPTP server based on MPD5 PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net/pptp/src/www/vpn_pptp.php b/net/pptp/src/www/vpn_pptp.php index 6ced725fe..e640a32b9 100644 --- a/net/pptp/src/www/vpn_pptp.php +++ b/net/pptp/src/www/vpn_pptp.php @@ -170,6 +170,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { unset($pptpcfg['radius']['radiusissueips']); } + plugins_interfaces(false); write_config(); $savemsg = get_std_save_message(); if_pptp_configure_do();