From 43088d3d1d6c58d610cba3f1251de8b93c7b96b6 Mon Sep 17 00:00:00 2001 From: smurphy Date: Fri, 24 Sep 2021 12:31:28 -0400 Subject: [PATCH 1/2] Fix for issue #1016 DHCP serves wrong Subnet Mask after updaiting in the webapp --- includes/dhcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/dhcp.php b/includes/dhcp.php index 53a33535..7785ae4b 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -182,7 +182,7 @@ function updateDnsmasqConfig($iface,$status) $config = '# RaspAP '.$iface.' configuration'.PHP_EOL; $config .= 'interface='.$iface.PHP_EOL. 'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd']. - ',255.255.255.0,'; + ','.$_POST['SubnetMask'].','; if ($_POST['RangeLeaseTimeUnits'] !== 'infinite') { $config .= $_POST['RangeLeaseTime']; } From 6c0b2d8b82d38c7666f3378eb08a8719307f8f11 Mon Sep 17 00:00:00 2001 From: smurphy Date: Fri, 24 Sep 2021 12:32:07 -0400 Subject: [PATCH 2/2] Fix for issue #1016 DHCP serves wrong Subnet Mask after updaiting in the webapp --- includes/dhcp.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/dhcp.php b/includes/dhcp.php index 7785ae4b..2329838b 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -180,9 +180,7 @@ function compareIPs($ip1, $ip2) function updateDnsmasqConfig($iface,$status) { $config = '# RaspAP '.$iface.' configuration'.PHP_EOL; - $config .= 'interface='.$iface.PHP_EOL. - 'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd']. - ','.$_POST['SubnetMask'].','; + $config .= 'interface='.$iface.PHP_EOL.'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd'].','.$_POST['SubnetMask'].','; if ($_POST['RangeLeaseTimeUnits'] !== 'infinite') { $config .= $_POST['RangeLeaseTime']; }