Project

General

Profile

« Previous | Next » 

Revision 7324b14b

Added by Ermal LUÇI over 11 years ago

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.

View differences:

etc/inc/interfaces.inc
3033 3033
			interface_6to4_configure($interface, $wancfg);
3034 3034
			break;
3035 3035
		case 'track6':
3036
			interface_track6_configure($interface, $wancfg);
3036
			interface_track6_configure($interface, $wancfg, $linkupevent);
3037 3037
			break;
3038 3038
		default:
3039 3039
			if (!in_array($tunnelif, array("gif", "gre", "ovp"))) {
......
3128 3128
	return 0;
3129 3129
}
3130 3130

  
3131
function interface_track6_configure($interface = "lan", $wancfg) {
3131
function interface_track6_configure($interface = "lan", $wancfg, $linkupevent = false) {
3132 3132
	global $config, $g;
3133 3133

  
3134 3134
	if (!is_array($wancfg))
......
3167 3167
			log_error("Interface {$interface} configured via {$wancfg['track6-interface']}  type {$type}");
3168 3168
		interface_track6_6rd_configure($interface, $wancfg);
3169 3169
		break;
3170
	case "dhcp6":
3171
		if ($linkupevent == true) {
3172
			/* 
3173
			 * NOTE: Usually come here from rc.linkup calling so just call directly intead of generating event
3174
			 *      Instead of disrupting all other v4 configuration just restart DHCPv6 client for now
3175
			 *
3176
			 * XXX: Probably DHCPv6 client should handle this autmagically itself?
3177
			 */
3178
			interface_dhcpv6_configure($wancfg['track6-interface'], $trackcfg);
3179
		}
3180
		break;
3170 3181
	}
3171 3182

  
3172
	if (!$g['booting']) {
3183
	if (!$g['booting'] && $linkupevent == false) {
3173 3184
		if (!function_exists('services_dhcpd_configure'))
3174 3185
			require_once("services.inc");
3175 3186

  

Also available in: Unified diff