}
/** Find a CONF_SECTION with name1 and optionally name2 in the specified conf section of one of its parents
+ *
+ * Will walk up the configuration tree, searching in each parent until a matching section is found or
+ * we hit the root.
*
* @param[in] cs The section we're searching in.
* @param[in] name1 of the section we're searching for. Special value CF_IDENT_ANY
#define LOG_PREFIX "proto_dns_udp"
#include <freeradius-devel/server/protocol.h>
+#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/util/udp.h>
#include <freeradius-devel/util/trie.h>
#include <freeradius-devel/io/application.h>
proto_dns_udp_t *inst = talloc_get_type_abort(mctx->inst->data, proto_dns_udp_t);
CONF_SECTION *conf = mctx->inst->conf;
size_t num;
- CONF_ITEM *ci;
CONF_SECTION *server_cs;
fr_client_t *client;
}
}
- ci = cf_parent(inst->cs); /* listen { ... } */
- fr_assert(ci != NULL);
- ci = cf_parent(ci);
- fr_assert(ci != NULL);
-
- server_cs = cf_item_to_section(ci);
+ server_cs = cf_section_find_in_parent(inst->cs, "server", NULL);
+ fr_assert(server_cs != NULL);
/*
* Look up local clients, if they exist.