Correct wrong key for checking if a interface type switched. Ticket #1420

This commit is contained in:
Ermal 2011-05-04 21:54:10 +00:00
parent 56da23dc5f
commit 8b1e7d04da

View File

@ -525,11 +525,11 @@ if ($_POST['apply']) {
}
}
if (!$input_errors) {
if ($wancfg['type'] != $_POST['type']) {
if ($wancfg['ipaddr'] != $_POST['type']) {
if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) {
$wancfg['if'] = $a_ppps[$pppid]['ports'];
unset($a_ppps[$pppid]);
} else if ($wancfg['type'] == "dhcp") {
} else if ($wancfg['ipaddr'] == "dhcp") {
$pid = find_dhclient_process($realif);
if($pid)
posix_kill($pid, SIGTERM);