* called when the instance data is freed.
*/
if (!nak) {
- if (dl_instance(NULL, &dl_inst, NULL, inst->dl_inst, "udp", DL_TYPE_SUBMODULE) < 0) {
- DEBUG("Failed to find proto_radius_%s", "udp");
+ if (dl_instance(NULL, &dl_inst, NULL, inst->dl_inst, inst->transport, DL_TYPE_SUBMODULE) < 0) {
+ DEBUG("Failed to find proto_radius_%s", inst->transport);
return NULL;
}
rad_assert(dl_inst != NULL);
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
+ proto_radius_t *inst;
CONF_SECTION *listen_cs = cf_item_to_section(cf_parent(ci));
CONF_SECTION *transport_cs;
parent_inst = cf_data_value(cf_data_find(listen_cs, dl_instance_t, "proto_radius"));
rad_assert(parent_inst);
+ /*
+ * Set the allowed codes so that we can compile them as
+ * necessary.
+ */
+ inst = talloc_get_type_abort(parent_inst->data, proto_radius_t);
+ inst->transport = name;
+
return dl_instance(ctx, out, transport_cs, parent_inst, name, DL_TYPE_SUBMODULE);
}
///< the I/O path.
fr_schedule_t *sc; //!< the scheduler
- int ipproto; //!< IP proto
+ int ipproto; //!< IP proto by number
+ char const *transport; //!< transport, typically name of IP proto
+
fr_event_list_t *el; //!< event list, for the master socket.
fr_network_t *nr; //!< network for the master socket