mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Nuke interface_track6_dhcp6_configure()
This function does 2 unecessary things: . Remove the IP address from interface set as Track, what is wrong and should be done by dhcp6c . Set a fixed IP when track6-interface is SLAAC, what never happens since it's impossible to track a SLAAC interface
This commit is contained in:
parent
a89b73428a
commit
30ad85534b
@ -3112,11 +3112,6 @@ function interface_track6_configure($interface = "lan", $wancfg) {
|
||||
log_error("Interface {$interface} configured via {$wancfg['track6-interface']} type {$type}");
|
||||
interface_track6_6rd_configure($interface, $wancfg);
|
||||
break;
|
||||
case "dhcp6":
|
||||
if ($g['debug'])
|
||||
log_error("Interface {$interface} configured via {$wancfg['track6-interface']} type {$type}");
|
||||
interface_track6_dhcp6_configure($interface, $wancfg);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!$g['booting']) {
|
||||
@ -3247,48 +3242,6 @@ function interface_track6_6to4_configure($interface = "lan", $lancfg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function interface_track6_dhcp6_configure($interface = "lan", $lancfg) {
|
||||
global $config, $g;
|
||||
global $interface_ipv6_arr_cache;
|
||||
global $interface_snv6_arr_cache;
|
||||
|
||||
if (!is_array($lancfg))
|
||||
return;
|
||||
|
||||
/* If the interface is not configured via another, exit */
|
||||
if (empty($lancfg['track6-interface']))
|
||||
return;
|
||||
|
||||
$wancfg = $config['interfaces'][$lancfg['track6-interface']];
|
||||
if (empty($wancfg)) {
|
||||
log_error("Interface {$interface} tracking non-existant interface {$lancfg['track6-interface']}");
|
||||
return;
|
||||
}
|
||||
|
||||
$lanif = get_real_interface($interface);
|
||||
$oip = find_interface_ipv6($lanif);
|
||||
if (is_ipaddrv6($oip))
|
||||
mwexec("/sbin/ifconfig {$lanif} inet6 {$oip} delete");
|
||||
unset($interface_ipv6_arr_cache[$lanif]);
|
||||
unset($interface_snv6_arr_cache[$lanif]);
|
||||
|
||||
if ($wancfg['ipaddrv6'] == "slaac") {
|
||||
$ifcfgipv6 = get_interface_ipv6($lancfg['track6-interface']);
|
||||
if (is_ipaddrv6($ifcfgipv6)) {
|
||||
$dhcp6lanarr = explode(":", Net_IPv6::uncompress($ifcfgipv6));
|
||||
$dhcp6lanarr[4] = 0;
|
||||
$dhcp6lanarr[5] = 0;
|
||||
$dhcp6lanarr[6] = 0;
|
||||
$dhcp6lanarr[7] = 1;
|
||||
$dhcp6lan = Net_IPv6::compress(implode(":", $dhcp6lanarr));
|
||||
log_error("dhcp6 {$interface} with ipv6 address {$dhcp6lan} based on {$lancfg['track6-interface']}");
|
||||
mwexec("/sbin/ifconfig {$lanif} inet6 {$dhcp6lan} prefixlen 64");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function interface_6rd_configure($interface = "wan", $wancfg) {
|
||||
global $config, $g;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user