Ticket #356. Clear the interface configuration if neccessary. To avoid strange situation described in the ticket.

This commit is contained in:
Ermal Lui 2010-02-23 22:56:11 +00:00
parent 83f9c8ee5e
commit 44088ce83a

View File

@ -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;