Added subnet mask display/edit

This commit is contained in:
billz
2020-11-30 12:10:44 +00:00
parent 5b1325803a
commit 495f33eaa3
3 changed files with 14 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ if (isset($interface)) {
preg_match('/static\sdomain_name_servers=(.*)/', $matched[0], $static_dns);
preg_match('/fallback\sstatic_'.$interface.'/', $matched[0], $fallback);
$dhcpdata['Metric'] = $metric[1];
$dhcpdata['StaticIP'] = $static_ip[1];
$dhcpdata['StaticIP'] = substr($static_ip[1], 0, strpos($static_ip[1],'/'));
$dhcpdata['SubnetMask'] = cidr2mask($static_ip[1]);
$dhcpdata['StaticRouters'] = $static_routers[1];
$dhcpdata['StaticDNS'] = $static_dns[1];
$dhcpdata['FallbackEnabled'] = empty($fallback) ? false: true;