summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-23 22:56:11 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-23 22:56:11 +0000
commit44088ce83aff8b3c1bb5ead1ccd7eeb56e3b2ee2 (patch)
tree2b3119cd745c03b0afc33ef074d08d1e04b08c31 /usr
parent83f9c8ee5efd56d3fd905d4c84c1cce8ce33529b (diff)
downloadpfsense-44088ce83aff8b3c1bb5ead1ccd7eeb56e3b2ee2.zip
pfsense-44088ce83aff8b3c1bb5ead1ccd7eeb56e3b2ee2.tar.gz
Ticket #356. Clear the interface configuration if neccessary. To avoid strange situation described in the ticket.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces_assign.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 66cb0d0..04b9979 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -188,9 +188,11 @@ if ($_POST['apply']) {
if (!is_array($ifport)) {
$reloadif = false;
- if (!empty($config['interfaces'][$ifname]['if']) && $config['interfaces'][$ifname]['if'] <> $ifport)
+ if (!empty($config['interfaces'][$ifname]['if']) && $config['interfaces'][$ifname]['if'] <> $ifport) {
+ interface_bring_down($ifname);
/* Mark this to be reconfigured in any case. */
$reloadif = true;
+ }
$config['interfaces'][$ifname]['if'] = $ifport;
if (preg_match('/^ppp_(.+)$/', $ifport, $matches)) {
$config['interfaces'][$ifname]['pointtopoint'] = true;
OpenPOWER on IntegriCloud