Project

General

Profile

« Previous | Next » 

Revision c55a0f0c

Added by Ermal LUÇI over 12 years ago

Do not do useless work before needed

View differences:

etc/inc/services.inc
892 892

  
893 893
	/* we add a fake entry for interfaces that are set to track6 another WAN */
894 894
	foreach ($Iflist as $ifname) {
895
		$realif = get_real_interface($ifname);
896
		$ifcfgipv6 = get_interface_ipv6($ifname);
897
		if(!is_ipaddrv6($ifcfgipv6))
898
			continue;
899
		$ifcfgipv6 = Net_IPv6::getNetmask($ifcfgipv6, 64);
900 895
		if (!empty($config['interfaces'][$ifname]['track6-interface'])) {
896
			$realif = get_real_interface($ifname);
897
			$ifcfgipv6 = get_interface_ipv6($ifname);
898
			if(!is_ipaddrv6($ifcfgipv6))
899
				continue;
900
			$ifcfgipv6 = Net_IPv6::getNetmask($ifcfgipv6, 64);
901 901
			$trackifname = $config['interfaces'][$ifname]['track6-interface'];
902 902
			$trackcfg = $config['interfaces'][$trackifname];
903 903
			$pdlen = calculate_ipv6_delegation_length($trackifname);

Also available in: Unified diff