From 7324b14b77bd75dec1f76cd28f4e4a48406be98f Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 10 Mar 2014 15:15:16 +0000 Subject: [PATCH] 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. --- etc/inc/interfaces.inc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3580c843b9..665ebedb95 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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");