summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-05-09 08:03:45 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-05-09 08:05:13 -0300
commitdb7a628c0f3bfefc2792908f1646fcb604eedd5c (patch)
tree440e5cd682b137ca8b912650ec7f01aea44b73dc /etc/inc/interfaces.inc
parent19341491e34d2f003284cb7df03cad920116d196 (diff)
downloadpfsense-db7a628c0f3bfefc2792908f1646fcb604eedd5c.zip
pfsense-db7a628c0f3bfefc2792908f1646fcb604eedd5c.tar.gz
Replace all linklocal checks by is_linklocal()
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 566d301..81a1d5f 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -4281,7 +4281,7 @@ function find_interface_ipv6($interface, $flush = false) {
foreach($output as $line) {
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
- if(! preg_match("/fe80:/i", $parts[1])) {
+ if(!is_linklocal($parts[1])) {
$ifinfo['ipaddrv6'] = $parts[1];
if($parts[2] == "-->") {
$parts[5] = "126";
@@ -4320,7 +4320,7 @@ function find_interface_ipv6_ll($interface, $flush = false) {
foreach($output as $line) {
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
- if(preg_match("/fe80:/i", $parts[1])) {
+ if(is_linklocal($parts[1])) {
$partsaddress = explode("%", $parts[1]);
$ifinfo['linklocal'] = $partsaddress[0];
}
@@ -4366,7 +4366,7 @@ function find_interface_subnetv6($interface, $flush = false) {
$line = trim($line);
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
- if(! preg_match("/fe80:/i", $parts[1])) {
+ if(!is_linklocal($parts[1])) {
$ifinfo['ipaddrv6'] = $parts[1];
if($parts[2] == "-->") {
$parts[5] = "126";
OpenPOWER on IntegriCloud