summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-15 12:10:05 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-15 12:12:25 -0300
commitef593cd3c06bcc9c314639697e65bb59dfbc56f8 (patch)
treefbc4e6abcdf1c9522345b98a1dc858135c61c405 /usr/local/www/system_routes_edit.php
parent966780ad0fab51e7ba9701d2052aefe1df1ebc01 (diff)
downloadpfsense-ef593cd3c06bcc9c314639697e65bb59dfbc56f8.zip
pfsense-ef593cd3c06bcc9c314639697e65bb59dfbc56f8.tar.gz
Add correct bitmask for ipv6
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-xusr/local/www/system_routes_edit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index de8cab5..ed9362a 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -152,8 +152,10 @@ if ($_POST) {
if (!empty($oroute)) {
if (is_alias($oroute['network'])) {
foreach (filter_expand_alias_array($oroute['network']) as $tgt) {
- if (is_ipaddr($tgt))
+ if (is_ipaddrv4($tgt))
$tgt .= "/32";
+ else if (is_ipaddrv6($tgt))
+ $tgt .= "/128";
if (!is_subnet($tgt))
continue;
$old_targets[] = $tgt;
OpenPOWER on IntegriCloud