From e7bfa231022d005a5e2dc0751e067323124606f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Wed, 25 Nov 2009 16:20:55 +0000 Subject: Resolves #174. If the interface reassignment changes reload the config for the interface. --- usr/local/www/interfaces_assign.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'usr') diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 89f8631..5132d80 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -183,6 +183,10 @@ if ($_POST['apply']) { (substr($ifname, 0, 3) == 'opt')) { if (!is_array($ifport)) { + $reloadif = false; + if (!empty($config['interfaces']['if']) && $config['interfaces']['if'] <> $ifport) + /* 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; @@ -200,6 +204,9 @@ if ($_POST['apply']) { /* make sure there is a descr for all interfaces */ if (!isset($config['interfaces'][$ifname]['descr'])) $config['interfaces'][$ifname]['descr'] = strtoupper($ifname); + if ($reloadif == true) + /* Reload all for the interface. */ + interface_configure($ifname, true); } } } -- cgit v1.1