Project

General

Profile

« Previous | Next » 

Revision 7c4c43a5

Added by Chris Buechler over 9 years ago

Add config upgrade code to enable and configure DHCPv6 server and radvd where track6 is in use, as they were automatically configured previously. Add same config to default config.xml to retain existing behavior there. Ticket #3029

View differences:

src/etc/inc/upgrade_config.inc
4567 4567
	}
4568 4568
}
4569 4569

  
4570
function upgrade_144_to_145() {
4571
	global $config;
4572

  
4573
	// Enable DHCPv6 server and radvd config for track6 interfaces, 
4574
	// matching what used to be automatically enabled with no user 
4575
	// configurability. 
4576
	if (is_array($config['interfaces'])) {
4577
		foreach ($config['interfaces'] as $ifname => $ifcfg) {
4578
			if (isset($ifcfg['enable'])) {
4579
				if ($ifcfg['ipaddrv6'] == "track6") {
4580
					$config['dhcpdv6'][$ifname]['enable'] = true;
4581
					$config['dhcpdv6'][$ifname]['range']['from'] = "::1000";
4582
					$config['dhcpdv6'][$ifname]['range']['to'] = "::2000";
4583
					$config['dhcpdv6'][$ifname]['ramode'] = "assist";
4584
					$config['dhcpdv6'][$ifname]['rapriority'] = "medium";
4585
				}
4586
			}
4587
		}
4588
	}
4589
}
4590

  
4570 4591
?>

Also available in: Unified diff