summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/etc/inc/IPv6.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/etc/inc/IPv6.inc b/src/etc/inc/IPv6.inc
index 5b7fb06..912fb06 100644
--- a/src/etc/inc/IPv6.inc
+++ b/src/etc/inc/IPv6.inc
@@ -740,8 +740,10 @@ class Net_IPv6
}
- $cip = preg_replace('/((^:)|(:$))/', '', $cip);
- $cip = preg_replace('/((^:)|(:$))/', '::', $cip);
+ if ($cip != "::") {
+ $cip = preg_replace('/((^:)|(:$))/', '', $cip);
+ $cip = preg_replace('/((^:)|(:$))/', '::', $cip);
+ }
if (empty($cip)) {
OpenPOWER on IntegriCloud