Index: index.php =================================================================== RCS file: /cvs/drupal/drupal/index.php,v retrieving revision 1.94 diff -u -p -r1.94 index.php --- index.php 26 Dec 2007 08:46:48 -0000 1.94 +++ index.php 10 Feb 2008 15:40:12 -0000 @@ -15,6 +15,9 @@ require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); +// Reset the cached client IP address which may have been stored between requests. +ip_address(TRUE); + $return = menu_execute_active_handler(); // Menu status constants are integers; page content is a string. Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.206 diff -u -p -r1.206 bootstrap.inc --- includes/bootstrap.inc 10 Jan 2008 22:47:17 -0000 1.206 +++ includes/bootstrap.inc 10 Feb 2008 15:40:12 -0000 @@ -1113,13 +1113,15 @@ function language_default($property = NU * instead of $_SERVER['REMOTE_ADDR'], which would be the IP address * of the proxy server, and not the client's. * + * @param $reset + * If TRUE, resets the cached IP address. * @return * IP address of client machine, adjusted for reverse proxy. */ -function ip_address() { +function ip_address($reset = FALSE) { static $ip_address = NULL; - if (!isset($ip_address)) { + if (!isset($ip_address) || $reset) { $ip_address = $_SERVER['REMOTE_ADDR']; if (variable_get('reverse_proxy', 0) && array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { // If an array of known reverse proxy IPs is provided, then trust