Project

General

Profile

Actions

Feature #2151

closed

Add IPv6 support to the pfSense module

Added by Seth Mos almost 13 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ermal Luçi
Category:
Interfaces
Target version:
Start date:
01/30/2012
Due date:
% Done:

90%

Estimated time:
Plus Target Version:
Release Notes:

Description

Lifted from /etc/inc/interfaces.inc FIXME notes.
We need something to set the IPv6 address. And we need to have a function return the IPv6 Address as well as the IPv6 link local address.


pfSense_interface_setaddress($realif, "{$wancfg['ipaddrv6']}/{$wancfg['subnetv6']}");
// FIXME: Add IPv6 Support to the pfSense module
mwexec("/sbin/ifconfig {$realif} inet6 {$wancfg['ipaddrv6']} prefixlen {$wancfg['subnetv6']} ");

$ifinfo = pfSense_get_interface_addresses($interface);
// FIXME: Add IPv6 support to the pfSense module
exec("/sbin/ifconfig {$interface} inet6", $output);
foreach($output as $line) {
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
if(! preg_match("/fe80::/", $parts[1])) {
$ifinfo['ipaddrv6'] = $parts[1];
if($parts[2] == "-->") {
$parts[5] = "126";
$ifinfo['subnetbitsv6'] = $parts[5];
} else {
$ifinfo['subnetbitsv6'] = $parts[3];
}
}
}
}
$interface_ipv6_arr_cache[$interface] = $ifinfo['ipaddrv6'];
$interface_snv6_arr_cache[$interface] = $ifinfo['subnetbitsv6'];


if (!isset($interface_llv6_arr_cache[$interface]) or $flush) {
$ifinfo = pfSense_get_interface_addresses($interface);
// FIXME: Add IPv6 support to the pfSense module
exec("/sbin/ifconfig {$interface} inet6", $output);
foreach($output as $line) {
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
if(preg_match("/fe80::/", $parts[1])) {
$partsaddress = explode("%", $parts[1]);
$ifinfo['linklocal'] = $partsaddress[0];
}
}
}
$interface_llv6_arr_cache[$interface] = $ifinfo['linklocal'];
}
return $interface_llv6_arr_cache[$interface];


if (!isset($interface_snv6_arr_cache[$interface]) or $flush) {
$ifinfo = pfSense_get_interface_addresses($interface);
// FIXME: Add IPv6 support to the pfSense module
exec("/sbin/ifconfig {$interface} inet6", $output);
foreach($output as $line) {
if(preg_match("/inet6/", $line)) {
$parts = explode(" ", $line);
if(! preg_match("/fe80::/", $parts[1])) {
$ifinfo['ipaddrv6'] = $parts[1];
if($parts[2] == "-->") {
$parts[5] = "126";
$ifinfo['subnetbitsv6'] = $parts[5];
} else {
$ifinfo['subnetbitsv6'] = $parts[3];
}
}
}
}
$interface_ipv6_arr_cache[$interface] = $ifinfo['ipaddrv6'];
$interface_snv6_arr_cache[$interface] = $ifinfo['subnetbitsv6'];

Actions #1

Updated by Chris Buechler over 12 years ago

  • Target version changed from 8 to 2.1
Actions #2

Updated by Ermal Luçi over 11 years ago

  • Target version changed from 2.1 to 2.2
Actions #3

Updated by Ermal Luçi over 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

This has been completed for the addresses part.

Actions #4

Updated by Chris Buechler about 10 years ago

  • Status changed from Feedback to Resolved

generally speaking, what's there is fine. if there are some specific things it's lacking, new tickets can be opened for those things.

Actions

Also available in: Atom PDF