Project

General

Profile

Bug #12527 ยป 814.diff

Jim Pingle, 06/02/2022 08:18 AM

View differences:

src/etc/inc/services.inc
1718 1718
		// of each subnet here is always /64.
1719 1719
		$pdlen = 64;
1720 1720

  
1721
		$range_from = $dhcpv6ifconf['range']['from'];
1722
		$range_to = $dhcpv6ifconf['range']['to'];
1723
		if ($ifcfgv6['ipaddrv6'] == 'track6') {
1724
			$range_from = merge_ipv6_delegated_prefix($ifcfgipv6, $range_from, $pdlen);
1725
			$range_to = merge_ipv6_delegated_prefix($ifcfgipv6, $range_to, $pdlen);
1726
		}
1727

  
1721 1728
		if (is_ipaddrv6($ifcfgipv6)) {
1722 1729
			$subnet_start = gen_subnetv6($ifcfgipv6, $ifcfgsnv6);
1723 1730
			$subnet_end = gen_subnetv6_max($ifcfgipv6, $ifcfgsnv6);
1724
			if ((!is_inrange_v6($dhcpv6ifconf['range']['from'], $subnet_start, $subnet_end)) ||
1725
			    (!is_inrange_v6($dhcpv6ifconf['range']['to'], $subnet_start, $subnet_end))) {
1731
			if ((!is_inrange_v6($range_from, $subnet_start, $subnet_end)) ||
1732
			    (!is_inrange_v6($range_to, $subnet_start, $subnet_end))) {
1726 1733
				log_error(gettext("The specified range lies outside of the current subnet. Skipping DHCP6 entry."));
1727 1734
				continue;
1728 1735
			}
......
1779 1786

  
1780 1787
		if (!is_ipaddrv6($ifcfgipv6)) {
1781 1788
			$ifcfgsnv6 = "64";
1782
			$subnetv6 = gen_subnetv6($dhcpv6ifconf['range']['from'], $ifcfgsnv6);
1789
			$subnetv6 = gen_subnetv6($range_from, $ifcfgsnv6);
1783 1790
		}
1784 1791

  
1785 1792
		$dhcpdv6conf .= "subnet6 {$subnetv6}/{$ifcfgsnv6}";
......
1807 1814

  
1808 1815
		$dhcpdv6conf .= " {\n";
1809 1816

  
1810
		$range_from = $dhcpv6ifconf['range']['from'];
1811
		$range_to = $dhcpv6ifconf['range']['to'];
1812
		if ($ifcfgv6['ipaddrv6'] == 'track6') {
1813
			$range_from = merge_ipv6_delegated_prefix($ifcfgipv6, $range_from, $pdlen);
1814
			$range_to = merge_ipv6_delegated_prefix($ifcfgipv6, $range_to, $pdlen);
1815
		}
1816

  
1817
		if (!empty($dhcpv6ifconf['range']['from']) && !empty($dhcpv6ifconf['range']['to'])) {
1817
		if (!empty($range_from) && !empty($range_to)) {
1818 1818
			$dhcpdv6conf .= "	range6 {$range_from} {$range_to};\n";
1819 1819
		}
1820 1820

  
    (1-1/1)