summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-10-27 07:32:03 -0200
committerRenato Botelho <renato@netgate.com>2016-10-27 07:33:10 -0200
commitfc0e31d71cd4f293fabe068355a4405285754c2c (patch)
treea4f45bb51823f46ac12b6386ba792b66684a37b8
parentc497ae1dc4baca71683d24eb2efdbd4f37654fbb (diff)
downloadpfsense-fc0e31d71cd4f293fabe068355a4405285754c2c.zip
pfsense-fc0e31d71cd4f293fabe068355a4405285754c2c.tar.gz
Import a patch to fix Net_IPv6::compress("::")
Obtained from: https://github.com/phil-davis/Net_IPv6/commit/638b96a253164b65c63825c38e79812b6c5f448d Submitted by: @phil-davis
-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