From 3aaf5744fb56e563b9777e0db56cc879f51844fb Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 6 Feb 2021 18:10:34 +0530 Subject: [PATCH] Exclusion: updated validation condition to allow single address exclusion. --- DnsServerCore/Dhcp/Exclusion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DnsServerCore/Dhcp/Exclusion.cs b/DnsServerCore/Dhcp/Exclusion.cs index 7f3c6a43..335da962 100644 --- a/DnsServerCore/Dhcp/Exclusion.cs +++ b/DnsServerCore/Dhcp/Exclusion.cs @@ -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;