Fixes #5712: Limit DHCP subnets for ISC if necessary

(cherry picked from commit cabb60bced3d0f255721401f25c0cc792d9019a0)