mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-06 16:53:59 +00:00
Exclusion: updated validation condition to allow single address exclusion.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user