Fix for now 'IPv6 - LAN looses Prefix after link event'(forums) with a not elegant solution but works. Probably dhcpv6 client should solve this by itself and generate and event for it. For now just bump dhcpv6 client again to have the prefix interface reconfigured.

This commit is contained in:
Ermal 2014-03-10 15:15:16 +00:00
parent 0d8fc8ec41
commit 7324b14b77

View File

@ -3033,7 +3033,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
interface_6to4_configure($interface, $wancfg);
break;
case 'track6':
interface_track6_configure($interface, $wancfg);
interface_track6_configure($interface, $wancfg, $linkupevent);
break;
default:
if (!in_array($tunnelif, array("gif", "gre", "ovp"))) {
@ -3128,7 +3128,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
return 0;
}
function interface_track6_configure($interface = "lan", $wancfg) {
function interface_track6_configure($interface = "lan", $wancfg, $linkupevent = false) {
global $config, $g;
if (!is_array($wancfg))
@ -3167,9 +3167,20 @@ 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 ($linkupevent == true) {
/*
* NOTE: Usually come here from rc.linkup calling so just call directly intead of generating event
* Instead of disrupting all other v4 configuration just restart DHCPv6 client for now
*
* XXX: Probably DHCPv6 client should handle this autmagically itself?
*/
interface_dhcpv6_configure($wancfg['track6-interface'], $trackcfg);
}
break;
}
if (!$g['booting']) {
if (!$g['booting'] && $linkupevent == false) {
if (!function_exists('services_dhcpd_configure'))
require_once("services.inc");