Exclusion: updated validation condition to allow single address exclusion.

This commit is contained in:
Shreyas Zare
2021-02-06 18:10:34 +05:30
parent b9ca61bb80
commit 3aaf5744fb

View File

@@ -36,8 +36,8 @@ namespace DnsServerCore.Dhcp
public Exclusion(IPAddress startingAddress, IPAddress endingAddress)
{
if (startingAddress.ConvertIpToNumber() >= endingAddress.ConvertIpToNumber())
throw new ArgumentException("Exclusion ending address must be greater than starting address.");
if (startingAddress.ConvertIpToNumber() > endingAddress.ConvertIpToNumber())
throw new ArgumentException("Exclusion ending address must be greater than or equal to starting address.");
_startingAddress = startingAddress;
_endingAddress = endingAddress;