You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/12/11 19:46:07 UTC
svn commit: r1644719 - in /vcl/trunk/web/.ht-inc: managementnode.php
utils.php
Author: jfthomps
Date: Thu Dec 11 18:46:06 2014
New Revision: 1644719
URL: http://svn.apache.org/r1644719
Log:
VCL-174 - NAT - support for sites that have small IP address ranges
utils.php: modified getRequestInfo and getNAThosts: changed natIP to publicIPaddress
managementnode.php: modified AJsaveResource and addResource: changed natIP to publicIPaddress
Modified:
vcl/trunk/web/.ht-inc/managementnode.php
vcl/trunk/web/.ht-inc/utils.php
Modified: vcl/trunk/web/.ht-inc/managementnode.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/managementnode.php?rev=1644719&r1=1644718&r2=1644719&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/managementnode.php (original)
+++ vcl/trunk/web/.ht-inc/managementnode.php Thu Dec 11 18:46:06 2014
@@ -530,13 +530,13 @@ class ManagementNode extends Resource {
if($row = mysql_fetch_assoc($qh)) {
$resourceid = $row['id'];
$query = "UPDATE nathost "
- . "SET natIP = '{$data['ipaddress']}' "
+ . "SET publicIPaddress = '{$data['ipaddress']}' "
. "WHERE resourceid = $resourceid";
doQuery($query);
if(! mysql_affected_rows($GLOBALS['mysql_link_vcl'])) {
$query = "INSERT INTO nathost "
. "(resourceid, "
- . "natIP) "
+ . "publicIPaddress) "
. "VALUES "
. "($resourceid, "
. "'{$data['ipaddress']}')";
@@ -932,7 +932,7 @@ class ManagementNode extends Resource {
// add entry to nathost table (TODO change in release after 2.4 when section added to manage nat hosts)
$query = "INSERT INTO nathost "
. "(resourceid, "
- . "natIP) "
+ . "publicIPaddress) "
. "VALUES ($resourceid, "
. "'{$data['ipaddress']}')";
doQuery($query);
Modified: vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1644719&r1=1644718&r2=1644719&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Thu Dec 11 18:46:06 2014
@@ -5471,7 +5471,7 @@ function getRequestInfo($id, $returnNULL
. "c.hostname, "
. "i.forcheckout, "
. "rs.pw AS password, "
- . "COALESCE(nh.natIP, c.IPaddress) AS connectIP, "
+ . "COALESCE(nh.publicIPaddress, c.IPaddress) AS connectIP, "
. "rs.remoteIP "
. "FROM reservation rs, "
. "image i, "
@@ -8678,7 +8678,7 @@ function getUsedBlockComputerids($start,
/// \return an array with info about the NAT hosts; each element's index is the
/// id from the table; each element has the following items\n
/// \b hostname\n
-/// \b natIP - IP to which users will connect
+/// \b publicIPaddress - IP to which users will connect
///
/// \brief builds an array of NAT hosts
///
@@ -8686,7 +8686,7 @@ function getUsedBlockComputerids($start,
function getNAThosts($id=0, $sort=0) {
$nathosts = array();
$query = "SELECT n.id, "
- . "n.natIP, "
+ . "n.publicIPaddress, "
. "COALESCE(c.hostname, m.hostname) AS hostname "
. "FROM nathost n "
. "LEFT JOIN resource r ON (n.resourceid = r.id) "