summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-09 21:19:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-09 21:19:53 +0000
commit91e8aab27d16b253ac0b5c2b62471737af0376c5 (patch)
tree14e5ef74c544ef30589f799bc785825ab737781a /usr/local/www
parentba0e11c7af2f30543f866abeeadedcfbd5729fb4 (diff)
downloadpfsense-91e8aab27d16b253ac0b5c2b62471737af0376c5.zip
pfsense-91e8aab27d16b253ac0b5c2b62471737af0376c5.tar.gz
If user is deleting a bridge, destroy it.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/interfaces.php7
-rwxr-xr-xusr/local/www/interfaces_lan.php7
-rwxr-xr-xusr/local/www/interfaces_opt.php7
-rwxr-xr-xusr/local/www/interfaces_wan.php7
4 files changed, 28 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 4265783..2872587 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -182,6 +182,13 @@ if ($_POST) {
if (!$input_errors) {
+ if($wancfg['bridge'] <> "" and $_POST['bridge'] == "") {
+ $bridge = discover_bridge($wancfg['if'], $wancfg['bridge'];
+ if($bridge) {
+ destroy_bridge($bridge);
+ }
+ }
+
unset($wancfg['ipaddr']);
unset($wancfg['subnet']);
unset($config['system']['gateway']);
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php
index 8f9f119..736b947 100755
--- a/usr/local/www/interfaces_lan.php
+++ b/usr/local/www/interfaces_lan.php
@@ -106,6 +106,13 @@ if ($_POST) {
if (!$input_errors) {
+ if($lancfg['bridge'] <> "" and $_POST['bridge'] == "") {
+ $bridge = discover_bridge($lancfg['if'], $lancfg['bridge'];
+ if($bridge) {
+ destroy_bridge($bridge);
+ }
+ }
+
$lancfg['bridge'] = $_POST['bridge'];
if (($lancfg['ipaddr'] != $_POST['ipaddr']) || ($lancfg['subnet'] != $_POST['subnet'])) {
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index 972752c..3afb0e7 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -165,6 +165,13 @@ if ($_POST) {
if (!$input_errors) {
+ if($optcfg['bridge'] <> "" and $_POST['bridge'] == "") {
+ $bridge = discover_bridge($optcfg['if'], $optcfg['bridge'];
+ if($bridge) {
+ destroy_bridge($bridge);
+ }
+ }
+
unset($optcfg['dhcphostname']);
$optcfg['descr'] = remove_bad_chars($_POST['descr']);
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index 4265783..2872587 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -182,6 +182,13 @@ if ($_POST) {
if (!$input_errors) {
+ if($wancfg['bridge'] <> "" and $_POST['bridge'] == "") {
+ $bridge = discover_bridge($wancfg['if'], $wancfg['bridge'];
+ if($bridge) {
+ destroy_bridge($bridge);
+ }
+ }
+
unset($wancfg['ipaddr']);
unset($wancfg['subnet']);
unset($config['system']['gateway']);
OpenPOWER on IntegriCloud