diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-17 20:00:05 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-17 20:00:05 -0700 |
commit | 6898927f4f48bd67710cffe0cdd828922254e25b (patch) | |
tree | 8588cbeee1fefb823e8072c281869870d0bae96a /usr/local/www/wizard.php | |
parent | 9c37f8cdc5a78706c645809fbabfb7320494ff17 (diff) | |
download | pfsense-6898927f4f48bd67710cffe0cdd828922254e25b.zip pfsense-6898927f4f48bd67710cffe0cdd828922254e25b.tar.gz |
Make this check more general in case someone makes a wizard that changes an opt interface's IP address and wants to use the "Reload in progress" step. Ticket #455
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-x | usr/local/www/wizard.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index cc9ce72..485dd17 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -921,10 +921,14 @@ function fixup_string($string) { $urlhost = $_SERVER['HTTP_HOST']; // If finishing the setup wizard, check if accessing on a LAN or WAN address that changed if($title == "Reload in progress") { - if ($urlhost == get_interface_ip("lan") && is_ipaddr($config['interfaces']['lan']['ipaddr'])) - $urlhost = $config['interfaces']['lan']['ipaddr']; - else if ($urlhost == get_interface_ip() && is_ipaddr($config['interfaces']['wan']['ipaddr'])) - $urlhost = $config['interfaces']['wan']['ipaddr']; + if (is_ipaddr($urlhost)) { + $host_if = find_ip_interface($urlhost); + if ($host_if) { + $host_if = convert_real_interface_to_friendly_interface_name($host_if); + if ($host_if && is_ipaddr($config['interfaces'][$host_if]['ipaddr'])) + $urlhost = $config['interfaces'][$host_if]['ipaddr']; + } + } } if($urlhost != $_SERVER['HTTP_HOST']) file_put_contents("{$g['tmp_path']}/setupwizard_lastreferrer", $proto . "://" . $_SERVER['HTTP_HOST'] . $urlport . $_SERVER['REQUEST_URI']); |