Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 80d2769e

Přidáno uživatelem Ondřej Fibich před více než 5 roky(ů)

Adds support for subnet /31 (255.255.255.254). IP addresses can be added with network address and broadcast address. Subnet display fixes (fixes #1103).

Zobrazit rozdíly:

application/controllers/ip_addresses.php
'IP address does not match the subnet/mask.'
));
}
else if ($size > 1 && ($ip == $net || $ip == ($net + $size - 1)))
else if ($size > 2 && ($ip == $net || $ip == ($net + $size - 1)))
{
$input->add_error('required', __('Invalid IP address'));
}
application/controllers/subnets.php
// subnet has gateway
$has_gateway = $subnet->has_gateway();
if ($has_gateway)
if ($has_gateway && $total_available != 2) // not for CIDR /31
{
$total_available = $total_available - 2;
application/helpers/valid.php
{
return false; // IP address does not match the subnet/mask
}
else if ($size > 1 && ($ip == $net || $ip == ($net + $size - 1)))
else if ($size > 2 && ($ip == $net || $ip == ($net + $size - 1)))
{
return false; // Invalid IP address
}

Také k dispozici: Unified diff