uint64_t child_number; //!< Monotonically increasing number for children of this request
char const *name; //!< for debug printing, as (%d) is no longer sufficient
+ fr_dict_t const *dict; //!< Dictionary of the protocol that this request belongs to.
+
fr_event_list_t *el; //!< thread-specific event list.
fr_heap_t *backlog; //!< thread-specific backlog
fr_request_state_t request_state; //!< state for the various protocol handlers.
fake->seq_start = 0; /* children always start with their own sequence */
fake->parent = request;
+ fake->dict = request->dict;
fake->root = request->root;
fake->client = request->client;
/*
* Attribute may be present with multiple names
*/
- da = fr_dict_attr_by_name(NULL, vpt->tmpl_da->name);
+ da = fr_dict_attr_by_name(fr_dict_by_da(vpt->tmpl_da), vpt->tmpl_da->name);
if (!da) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_ATTR "
"attribute \"%s\" (%s) not found in global dictionary",
*/
if (!head) return -1;
- da = fr_dict_attr_by_name(NULL, fmt);
+ da = fr_dict_attr_by_name(request->dict, fmt);
if (!da) {
ERROR("Unknown attribute \"%s\"", fmt);
return -1;
rad_assert(data[0] < FR_MAX_PACKET_CODE);
+ /*
+ * Set the request dictionary so that we can do
+ * generic->protocol attribute conversions as
+ * the request runs through the server.
+ */
+ request->dict = dict_dhcpv4;
+
#if 0
/*
* @todo - print hex packets here!
fr_radius_print_hex(fr_log_fp, data, data_len);
}
+ /*
+ * Set the request dictionary so that we can do
+ * generic->protocol attribute conversions as
+ * the request runs through the server.
+ */
+ request->dict = dict_radius;
+
client = address->radclient;
/*
fr_vmps_print_hex(fr_log_fp, data, data_len);
}
+ /*
+ * Set the request dictionary so that we can do
+ * generic->protocol attribute conversions as
+ * the request runs through the server.
+ */
+ request->dict = dict_vqp;
+
client = address->radclient;
/*
return -1;
}
- da = fr_dict_attr_by_name(NULL, attr);
+ da = fr_dict_attr_by_name(request->dict, attr);
if (!da) {
RWDEBUG("No such attribute '%s'", attr);
return -1;
* Lookup the string attr_name in the
* request dictionary.
*/
- da = fr_dict_attr_by_name(NULL, attr_name);
+ da = fr_dict_attr_by_name(request->dict, attr_name);
if (!da) {
RPERROR("Invalid attribute \"%s\"", attr_name);
goto error;
return -1;
}
- da = fr_dict_attr_by_name(NULL, attr);
+
+ da = fr_dict_attr_by_name(request->dict, attr);
if (!da) {
RWDEBUG("No such attribute '%s'", attr);
return -1;
return -1;
}
- da = fr_dict_attr_by_name(NULL, attr);
+ da = fr_dict_attr_by_name(request->dict, attr);
if (!da) {
REDEBUG("Unknown or invalid attribute name \"%s\"", attr);
return -1;
continue;
}
- da = fr_dict_attr_by_name(NULL, attribute);
+ da = fr_dict_attr_by_name(request->dict, attribute);
if (!da) {
RWDEBUG("Attribute \"%s\" unknown, skipping", attribute);
if (!local_stats[i]) continue;
strlcpy(buffer + 18, fr_packet_codes[i], sizeof(buffer) - 18);
- da = fr_dict_attr_by_name(NULL, buffer);
+ da = fr_dict_attr_by_name(dict_radius, buffer);
if (!da) continue;
vp = fr_pair_afrom_da(request->reply, da);