Fix checking DHCP end IP is in range

Cut-paste bug
Merge pull request #861 from phil-davis/master

Fix checking DHCP end IP is in range