summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-28 16:04:06 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-28 16:04:06 +1100
commitcfbda5433af14d689b675447d56647588ef677dc (patch)
treef87b6069c3b5546813bf36c43cdde99b321f7359 /inc/functions.php
parentc27027d3e069d6c0746bffd808411f35bfd753b9 (diff)
Fix for IPv6-IPv4 setups with IPv4 addresses as "::x.x.x.x" and not :ffff
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index fabe5518..1b324a79 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -61,7 +61,7 @@
$__ip = $_SERVER['REMOTE_ADDR'];
// ::ffff:0.0.0.0
- if(preg_match('/^\:\:ffff\:(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
+ if(preg_match('/^\:\:(ffff\:)?(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
$_SERVER['REMOTE_ADDR'] = $m[1];
}
}