mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Call interface_ipalias_cleanup() after $interface is initialized, and get current IP after it
This commit is contained in:
parent
e4a0be9bee
commit
eb8e0aa9d6
@ -46,9 +46,6 @@ require_once("rrd.inc");
|
||||
if($g['booting'])
|
||||
exit;
|
||||
|
||||
/* NOTE: Check #2495 before being smart here */
|
||||
interface_ipalias_cleanup($interface, "inet4");
|
||||
|
||||
function restart_packages() {
|
||||
global $oldip, $curwanip, $g;
|
||||
|
||||
@ -65,12 +62,19 @@ $argument = str_replace("\n", "", $argv[1]);
|
||||
log_error("rc.newwanip: Informational is starting {$argument}.");
|
||||
|
||||
if(empty($argument)) {
|
||||
$curwanip = get_interface_ip();
|
||||
$interface = "wan";
|
||||
$interface_real = get_real_interface();
|
||||
} else {
|
||||
$interface = convert_real_interface_to_friendly_interface_name($argument);
|
||||
$interface_real = $argument;
|
||||
}
|
||||
|
||||
/* NOTE: Check #2495 before being smart here */
|
||||
interface_ipalias_cleanup($interface, "inet4");
|
||||
|
||||
if(empty($argument))
|
||||
$curwanip = get_interface_ip();
|
||||
else {
|
||||
$curwanip = find_interface_ip($interface_real, true);
|
||||
if($curwanip == "")
|
||||
$curwanip = get_interface_ip($interface);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user