Added functionality for checking network with or without netmask

-> Required for fixing bnc#800592