diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-22 01:25:38 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-22 01:25:38 +0000 |
commit | 94420171e9f6ed7dc29e0ce8a2b4fbb2f7738640 (patch) | |
tree | 6270e4b16c3f452911cd32ce1f221a2e0529e6ee /usr | |
parent | a728d2ea75d6f467506e017bd4dc3678849e8aa7 (diff) | |
download | pfsense-94420171e9f6ed7dc29e0ce8a2b4fbb2f7738640.zip pfsense-94420171e9f6ed7dc29e0ce8a2b4fbb2f7738640.tar.gz |
Import slightly diff address_to_pconfig as address_to_pconfig_vpn()
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/vpn_ipsec_edit.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php index bb4cfa1..083ec8e 100755 --- a/usr/local/www/vpn_ipsec_edit.php +++ b/usr/local/www/vpn_ipsec_edit.php @@ -50,7 +50,7 @@ if (isset($id) && $a_ipsec[$id]) { if (!isset($a_ipsec[$id]['local-subnet'])) $pconfig['localnet'] = "lan"; else - address_to_pconfig($a_ipsec[$id]['local-subnet'], $pconfig['localnet'], $pconfig['localnetmask']); + address_to_pconfig_vpn($a_ipsec[$id]['local-subnet'], $pconfig['localnet'], $pconfig['localnetmask']); if ($a_ipsec[$id]['interface']) $pconfig['interface'] = $a_ipsec[$id]['interface']; @@ -565,3 +565,19 @@ methodsel_change(); //--> </script> <?php include("fend.inc"); ?> + + +<?php + +function address_to_pconfig_vpn($adr, &$padr, &$pmask) { + + if ($adr['network']) + $padr = $adr['network']; + else if ($adr['address']) { + list($padr, $pmask) = explode("/", $adr['address']); + if (is_null($pmask)) + $pmask = 32; + } +} + +?>
\ No newline at end of file |