mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #278 from pi-hole/Mcat12-fix-noIPv4-DHCP
Handle no IPv4 address when guessing initial DHCP
This commit is contained in:
+11
-4
@@ -106,10 +106,17 @@
|
||||
{
|
||||
$DHCP = false;
|
||||
// Try to guess initial settings
|
||||
$DHCPdomain = explode(".",$piHoleIPv4);
|
||||
$DHCPstart = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".201";
|
||||
$DHCPend = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".251";
|
||||
$DHCProuter = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".1";
|
||||
if($piHoleIPv4 !== "unknown") {
|
||||
$DHCPdomain = explode(".",$piHoleIPv4);
|
||||
$DHCPstart = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".201";
|
||||
$DHCPend = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".251";
|
||||
$DHCProuter = $DHCPdomain[0].".".$DHCPdomain[1].".".$DHCPdomain[2].".1";
|
||||
}
|
||||
else {
|
||||
$DHCPstart = "";
|
||||
$DHCPend = "";
|
||||
$DHCProuter = "";
|
||||
}
|
||||
}
|
||||
if(isset($setupVars["PIHOLE_DOMAIN"])){
|
||||
$piHoleDomain = $setupVars["PIHOLE_DOMAIN"];
|
||||
|
||||
Reference in New Issue
Block a user