mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
dhcp: more conversion
This commit is contained in:
parent
d4bd722337
commit
4f721fc0f2
@ -188,8 +188,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
|
||||
if (count($input_errors) == 0) {
|
||||
/* make sure the range lies within the current subnet */
|
||||
$ifcfgip = get_interface_ipv6($if);
|
||||
$ifcfgsn = get_interface_subnetv6($if);
|
||||
list ($ifcfgip, $ifcfgsn) = explode('/', find_interface_networkv6(get_real_interface($if, 'inet6'), false));
|
||||
$subnet_start = gen_subnetv6($ifcfgip, $ifcfgsn);
|
||||
$subnet_end = gen_subnetv6_max($ifcfgip, $ifcfgsn);
|
||||
|
||||
@ -329,8 +328,7 @@ legacy_html_escape_form_data($pconfig);
|
||||
|
||||
include("head.inc");
|
||||
|
||||
$wifcfgip = get_interface_ipv6($if);
|
||||
$wifcfgsn = get_interface_subnetv6($if);
|
||||
list ($wifcfgip, $wifcfgsn) = explode('/', find_interface_networkv6(get_real_interface($if, 'inet6'), false));
|
||||
|
||||
if (isset($config['interfaces'][$if]['dhcpd6track6allowoverride'])) {
|
||||
$prefix_array = array();
|
||||
|
||||
@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
if (!empty($pconfig['gateway']) && is_ipaddr($pconfig['gateway'])) {
|
||||
if (is_ipaddrv4($pconfig['gateway'])) {
|
||||
list ($parent_ip, $parent_sn) = explode('/', find_interface_network(get_real_interface($pconfig['interface']), true));
|
||||
list ($parent_ip, $parent_sn) = explode('/', find_interface_network(get_real_interface($pconfig['interface']), false));
|
||||
$parent_ip = empty($pconfig['ajaxip']) ? $parent_ip : $pconfig['ajaxip'];
|
||||
$parent_sn = empty($pconfig['ajaxnet']) ? $parent_sn : $pconfig['ajaxnet'];
|
||||
if (empty($parent_ip) || empty($parent_sn)) {
|
||||
@ -104,7 +104,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} elseif (is_ipaddrv6($pconfig['gateway'])) {
|
||||
/* do not do a subnet match on a link local address, it's valid */
|
||||
if (!is_linklocal($pconfig['gateway'])) {
|
||||
list ($parent_ip, $parent_sn) = explode('/', find_interface_networkv6(get_real_interface($pconfig['interface'], 'inet6'), true));
|
||||
list ($parent_ip, $parent_sn) = explode('/', find_interface_networkv6(get_real_interface($pconfig['interface'], 'inet6'), false));
|
||||
$parent_ip = empty($pconfig['ajaxip']) ? $parent_ip : $pconfig['ajaxip'];
|
||||
$parent_sn = empty($pconfig['ajaxnet']) ? $parent_sn : $pconfig['ajaxnet'];
|
||||
if (empty($parent_ip) || empty($parent_sn)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user