diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-04-10 08:07:07 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-04-10 08:07:07 -0300 |
commit | 8543a5bbe2037c9214f967806f417c7c4ba3b062 (patch) | |
tree | 8841722ca000796f3066d58f230059d89159eff6 /usr/local/www/system_routes_edit.php | |
parent | 87f611017953aadb5db66ded7d27724786b0d118 (diff) | |
download | pfsense-8543a5bbe2037c9214f967806f417c7c4ba3b062.zip pfsense-8543a5bbe2037c9214f967806f417c7c4ba3b062.tar.gz |
Prohibit adding aliases containing FQDNs in static routes. Fixes #2941
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-x | usr/local/www/system_routes_edit.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php index cd85c4e..28649e0 100755 --- a/usr/local/www/system_routes_edit.php +++ b/usr/local/www/system_routes_edit.php @@ -125,7 +125,15 @@ if ($_POST) { } } elseif (is_alias($_POST['network'])) { $osn = $_POST['network']; + $fqdn_found = 0; foreach (filter_expand_alias_array($_POST['network']) as $tgt) { + if (!is_ipaddr($tgt) && is_hostname($tgt)) { + if ($fqdn_found === 0) { + $input_errors[] = sprintf(gettext("The alias (%s) has one or more FQDNs configured and cannot be used to configure a static route."), $_POST['network']); + $fqdn_found = 1; + } + continue; + } if (is_ipaddrv4($tgt)) $tgt .= "/32"; if (is_ipaddrv6($tgt)) |