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