Fixes #5712: Limit DHCP subnets for ISC if necessary

Implementation copied from 700e96b