summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes_edit.php
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2010-11-02 22:00:05 +0100
committerSeth Mos <seth.mos@dds.nl>2010-11-02 22:00:05 +0100
commit14f565b4210af36dc26af97a3cecdd966af791a9 (patch)
tree5f9a3c9ef389fb16005ebf6298da619deb2b2581 /usr/local/www/system_routes_edit.php
parent7617e245bb6886848a23cd453fb720eefe2bff8b (diff)
downloadpfsense-14f565b4210af36dc26af97a3cecdd966af791a9.zip
pfsense-14f565b4210af36dc26af97a3cecdd966af791a9.tar.gz
Allow the entry of ipv6 networks, needs verification to prevent ipv4 gateways for ipv6 networks and vice versa
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-xusr/local/www/system_routes_edit.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index 96d24d5..d48c542 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -104,7 +104,12 @@ if ($_POST) {
}
/* check for overlaps */
- $osn = gen_subnet($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet'];
+ if(is_ipaddrv6($_POST['network'])) {
+ $osn = Net_IPv6::compress(gen_subnetv6($_POST['network'], $_POST['network_subnet'])) . "/" . $_POST['network_subnet'];
+ }
+ if(is_ipaddrv4($POST['network'])) {
+ $osn = gen_subnet($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet'];
+ }
foreach ($a_routes as $route) {
if (isset($id) && ($a_routes[$id]) && ($a_routes[$id] === $route))
continue;
OpenPOWER on IntegriCloud