summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-09-21 23:22:57 -0500
committerChris Buechler <cmb@pfsense.org>2015-09-21 23:22:57 -0500
commit352f808558feda0d3eecefbf150e47d88315a01c (patch)
tree89623df1886b9c80d3de64b47818d5b9ab1ddde8
parent1f1cd32f17c8509811ab0ee00d6ffccee064cd51 (diff)
downloadpfsense-352f808558feda0d3eecefbf150e47d88315a01c.zip
pfsense-352f808558feda0d3eecefbf150e47d88315a01c.tar.gz
Don't allow configuring IPv6 link local addresses on an interface. Ticket #4062
-rw-r--r--src/usr/local/www/interfaces.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index c3714ab..36717e7 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -742,6 +742,9 @@ if ($_POST['apply']) {
if (!is_ipaddrv6($_POST['ipaddrv6'])) {
$input_errors[] = gettext("A valid IPv6 address must be specified.");
} else {
+ if (ip_in_subnet($_POST['ipaddrv6'], "fe80::/10")) {
+ $input_errors[] = gettext("IPv6 link local addresses cannot be configured as an interface IP.");
+ }
$where_ipaddr_configured = where_is_ipaddr_configured($_POST['ipaddrv6'], $if, true, true, $_POST['subnetv6']);
if (count($where_ipaddr_configured)) {
$subnet_conflict_text = sprintf(gettext("IPv6 address %s is being used by or overlaps with:"), $_POST['ipaddrv6'] . "/" . $_POST['subnetv6']);
OpenPOWER on IntegriCloud