networks: Fix issue with setting default netmask
networks: Fix issue with setting default netmask

- Minor refactoring of DNS server setting code.

freedomboxtwh/Plinth,freedomboxtwh/Plinth,harry-7/Plinth,harry-7/Plinth,vignanl/Plinth,vignanl/Plinth,kkampardi/Plinth,freedomboxtwh/Plinth,kkampardi/Plinth,harry-7/Plinth,kkampardi/Plinth,freedomboxtwh/Plinth,kkampardi/Plinth,vignanl/Plinth,vignanl/Plinth,harry-7/Plinth,vignanl/Plinth,kkampardi/Plinth,harry-7/Plinth,freedomboxtwh/Plinth