summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes_edit.php
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-23 10:53:49 +0200
committersmos <seth.mos@dds.nl>2012-05-23 10:53:49 +0200
commit71f4a2b70c7283fbc8b4aeb40527c76bfbbd7feb (patch)
tree877a9384aa24f04494caae44198a87f19b73d203 /usr/local/www/system_routes_edit.php
parent73ce690995bb5969eb2102b82176e38b6522a83e (diff)
downloadpfsense-71f4a2b70c7283fbc8b4aeb40527c76bfbbd7feb.zip
pfsense-71f4a2b70c7283fbc8b4aeb40527c76bfbbd7feb.tar.gz
Unbreak adding IPv6 static routes
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-xusr/local/www/system_routes_edit.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index ac7e9f1..dfef30a 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -113,7 +113,7 @@ if ($_POST) {
$osn = Net_IPv6::compress(gen_subnetv6($_POST['network'], $_POST['network_subnet'])) . "/" . $_POST['network_subnet'];
$new_targets[] = $osn;
}
- if (is_ipaddr($_POST['network'])) {
+ if (is_ipaddrv4($_POST['network'])) {
if($_POST['network_subnet'] > 32)
$input_errors[] = gettext("A IPv4 subnet can not be over 32 bits.");
else {
@@ -125,16 +125,20 @@ if ($_POST) {
foreach (filter_expand_alias_array($_POST['network']) as $tgt) {
if (is_ipaddr($tgt))
$tgt .= "/32";
+ if (is_ipaddr($tgt))
+ $tgt .= "/128";
if (!is_subnet($tgt))
continue;
+ if (!is_subnet_v6($tgt))
+ continue;
$new_targets[] = $tgt;
}
}
if (!isset($id))
$id = count($a_routes);
$oroute = $a_routes[$id];
+ $old_targets = array();
if (!empty($oroute)) {
- $old_targets = array();
if (is_alias($oroute['network'])) {
foreach (filter_expand_alias_array($oroute['network']) as $tgt) {
if (is_ipaddr($tgt))
OpenPOWER on IntegriCloud