diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-03-04 09:57:28 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-03-04 09:57:28 -0300 |
commit | e12ad49f4621ec9e99ca829c2d7188ad456638f8 (patch) | |
tree | d385d0a1ea9f6e75876b5c05037d23cf9accd1e7 /usr/local/www/interfaces.php | |
parent | 4a7352101fbd6901b46a3b6a9a3c00d23b75f0e1 (diff) | |
download | pfsense-e12ad49f4621ec9e99ca829c2d7188ad456638f8.zip pfsense-e12ad49f4621ec9e99ca829c2d7188ad456638f8.tar.gz |
Save ppp info and realif on interfaces.apply to be able to cleanup old configuration when changing interface type. Fixes #2758
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-x | usr/local/www/interfaces.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 2f6fd48..eef3f9f 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -86,6 +86,8 @@ $a_gateways = &$config['gateways']['gateway_item']; $wancfg = &$config['interfaces'][$if]; $old_wancfg = $wancfg; +$old_wancfg['realif'] = get_real_interface($if); +$old_ppps = $a_ppps; // Populate page descr if it does not exist. if ($if == "wan" && !$wancfg['descr']) $wancfg['descr'] = "WAN"; @@ -399,7 +401,8 @@ if ($_POST['apply']) { } else { $toapplylist = array(); } - $toapplylist[$if] = $wancfg; + $toapplylist[$if]['ifcfg'] = $wancfg; + $toapplylist[$if]['ppps'] = $a_ppps; /* we need to be able remove IP aliases for IPv6 */ file_put_contents("{$g['tmp_path']}/.interfaces.apply", serialize($toapplylist)); header("Location: interfaces.php?if={$if}"); @@ -929,7 +932,8 @@ if ($_POST['apply']) { } else { $toapplylist = array(); } - $toapplylist[$if] = $old_wancfg; + $toapplylist[$if]['ifcfg'] = $old_wancfg; + $toapplylist[$if]['ppps'] = $old_ppps; file_put_contents("{$g['tmp_path']}/.interfaces.apply", serialize($toapplylist)); mark_subsystem_dirty('interfaces'); |