diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-07-16 16:31:34 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-07-16 16:34:47 -0300 |
commit | eb8e0aa9d60fbd2b504ba1b33cf6b2cb17d59649 (patch) | |
tree | 9e16b0b94f5479f6380165cc8f19d5ca1e1e393f | |
parent | e4a0be9bee26f71da33e1fa4fca41f597fda2dbd (diff) | |
download | pfsense-eb8e0aa9d60fbd2b504ba1b33cf6b2cb17d59649.zip pfsense-eb8e0aa9d60fbd2b504ba1b33cf6b2cb17d59649.tar.gz |
Call interface_ipalias_cleanup() after $interface is initialized, and get current IP after it
-rwxr-xr-x | etc/rc.newwanip | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 5b3c483..cdeb4d2 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -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); |