Project

General

Profile

Bug #11539 ยป 11539-split-fix.diff

Jim Pingle, 03/04/2021 02:57 PM

View differences:

src/etc/inc/ipsec.inc
1558 1558
		$v4pool['addrs'] = "{$a_client['pool_address']}/{$a_client['pool_netbits']}";
1559 1559
		if (!empty($net_list4)) {
1560 1560
			$v4pool['subnet'] = implode(",", $net_list4);
1561
			$v4pool['split_include'] = implode(",", $net_list4);
1561
			/* Do not include 0.0.0.0/0 in split_include, it is not compatible. */
1562
			$net_list4 = array_diff($net_list4, array('0.0.0.0/0'));
1563
			if (!empty($net_list4)) {
1564
				$v4pool['split_include'] = implode(",", $net_list4);
1565
			}
1562 1566
			unset($net_list4);
1563 1567
		}
1564 1568
	}
......
1568 1572
		$v6pool['addrs'] = "{$a_client['pool_address_v6']}/{$a_client['pool_netbits_v6']}";
1569 1573
		if (!empty($net_list6)) {
1570 1574
			$v6pool['subnet'] = implode(",", $net_list6);
1571
			$v6pool['split_include'] = implode(",", $net_list6);
1575
			/* Do not include ::/0 in split_include, it is not compatible. */
1576
			$net_list6 = array_diff($net_list6, array('::/0'));
1577
			if (!empty($net_list6)) {
1578
				$v6pool['split_include'] = implode(",", $net_list6);
1579
			}
1572 1580
			unset($net_list6);
1573 1581
		}
1574 1582
	}
    (1-1/1)