This function replaces the one that checked whether there is a subnet for an interface and returns boolean value.