[PATCH v10] pasta: Refactor pasta_ns_conf() to reduce nesting