Revision 31ace4ea
Added by Seth Mos over 14 years ago
etc/inc/interfaces.inc | ||
---|---|---|
3149 | 3149 |
{ |
3150 | 3150 |
global $interface_ipv6_arr_cache; |
3151 | 3151 |
global $interface_snv6_arr_cache; |
3152 |
|
|
3152 |
global $config; |
|
3153 |
|
|
3153 | 3154 |
$interface = str_replace("\n", "", $interface); |
3154 | 3155 |
|
3155 | 3156 |
if (!does_interface_exist($interface)) |
... | ... | |
3158 | 3159 |
/* Setup IP cache */ |
3159 | 3160 |
if (!isset($interface_ipv6_arr_cache[$interface]) or $flush) { |
3160 | 3161 |
$ifinfo = pfSense_get_interface_addresses($interface); |
3162 |
exec("/sbin/ifconfig {$interface} inet6", $output); |
|
3163 |
foreach($output as $line) { |
|
3164 |
if(preg_match("/inet6/", $line)) { |
|
3165 |
$parts = explode(" ", $line); |
|
3166 |
if(! stristr("fe80::", $parts[1])) { |
|
3167 |
$ifinfo['ipaddrv6'] = $parts[1]; |
|
3168 |
$ifinfo['subnetbitsv6'] = $parts[3]; |
|
3169 |
} |
|
3170 |
} |
|
3171 |
} |
|
3161 | 3172 |
$interface_ipv6_arr_cache[$interface] = $ifinfo['ipaddrv6']; |
3162 | 3173 |
$interface_snv6_arr_cache[$interface] = $ifinfo['subnetbitsv6']; |
3163 | 3174 |
} |
Also available in: Unified diff
Add the ipv6 address and subnet onto the existing ifinfo array until the pfsense module supports it