diff options
author | jim-p <jimp@pfsense.org> | 2015-08-18 14:12:54 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-08-18 14:12:54 -0400 |
commit | c617ffe7a4cba6cca864a17e42a1bfd2c55d947a (patch) | |
tree | dc938f33409c2ce318b044087e666697bf256649 /usr/local | |
parent | 1ce2e5d2530cc1a076fc2ae49e653dc8935dd6a5 (diff) | |
download | pfsense-c617ffe7a4cba6cca864a17e42a1bfd2c55d947a.zip pfsense-c617ffe7a4cba6cca864a17e42a1bfd2c55d947a.tar.gz |
Fix source address selection on Test Port to handle VIPs properly.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/diag_testport.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/local/www/diag_testport.php b/usr/local/www/diag_testport.php index b64075e..902e1e2 100644 --- a/usr/local/www/diag_testport.php +++ b/usr/local/www/diag_testport.php @@ -201,7 +201,15 @@ include("head.inc"); ?> /* Attempt to determine the interface address, if possible. Else try both. */ if (is_ipaddrv4($host)) { - $ifaddr = ($sourceip == "any") ? "" : get_interface_ip($sourceip); + if ($sourceip == "any") { + $ifaddr = ""; + } else { + if (is_ipaddr($sourceip)) { + $ifaddr = $sourceip; + } else { + $ifaddr = get_interface_ip($sourceip); + } + } $nc_args .= " -4"; } elseif (is_ipaddrv6($host)) { if ($sourceip == "any") |