summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-09-02 14:58:15 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-09-02 14:58:15 -0300
commit060c3ac00b71131c08ad1a88033b14546bb6b53b (patch)
treee7acee7d22fef2b09e02ec5183a7d874e16f4065 /etc/inc/ipsec.inc
parent55d6f48bc8f5b24f0756e52a121b26c2a57fe186 (diff)
downloadpfsense-060c3ac00b71131c08ad1a88033b14546bb6b53b.zip
pfsense-060c3ac00b71131c08ad1a88033b14546bb6b53b.tar.gz
Fix subnet display for IPsec status. Ticket #3826
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r--etc/inc/ipsec.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index dd2f033..b55187f 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -742,4 +742,20 @@ function ipsec_find_id(& $ph1ent, $side = "local", $rgmap = array()) {
}
return array($thisid_type, $thisid_data);
}
+
+function ipsec_fixup_network($network) {
+ if (substr($network, -3) == '|/0')
+ $result = substr($network, 0, -3);
+ else {
+ $tmp = explode('|', $network);
+ if (isset($tmp[1]))
+ $result = $tmp[1];
+ else
+ $result = $tmp[0];
+ unset($tmp);
+ }
+
+ return $result;
+}
+
?>
OpenPOWER on IntegriCloud