static int cmd_show_client(FILE *fp, FILE *fp_err, UNUSED void *ctx, fr_cmd_info_t const *info)
{
- RADCLIENT *client;
+ fr_client_t *client;
if (info->argc >= 2) {
int proto;
*/
static void usage(main_config_t const *config, int status);
-static RADCLIENT *client_alloc(TALLOC_CTX *ctx, char const *ip, char const *name)
+static fr_client_t *client_alloc(TALLOC_CTX *ctx, char const *ip, char const *name)
{
CONF_SECTION *cs;
- RADCLIENT *client;
+ fr_client_t *client;
cs = cf_section_alloc(ctx, NULL, "client", name);
MEM(cf_pair_alloc(cs, "ipaddr", ip, T_OP_EQ, T_BARE_WORD, T_BARE_WORD));
return client;
}
-static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client, CONF_SECTION *server_cs)
+static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, fr_client_t *client, CONF_SECTION *server_cs)
{
fr_pair_t *vp;
request_t *request;
fr_pair_list_t filter_vps;
bool xlat_only = false;
fr_event_list_t *el = NULL;
- RADCLIENT *client = NULL;
+ fr_client_t *client = NULL;
fr_dict_t *dict = NULL;
fr_dict_t const *dict_check;
char const *receipt_file = NULL;
* - NULL on error
* - !NULL the packet tracking structure
*/
-typedef void *(*fr_io_track_create_t)(void const *instance, void *thread_instance, RADCLIENT *client, fr_io_track_t *track, uint8_t const *packet, size_t packet_len);
+typedef void *(*fr_io_track_create_t)(void const *instance, void *thread_instance, fr_client_t *client, fr_io_track_t *track, uint8_t const *packet, size_t packet_len);
/** Compare two tracking structures for storing in a duplicate detection tree.
*
* - >0 on packet two "larger" than packet one
* - =0 on the two packets being identical
*/
-typedef int (*fr_io_track_cmp_t)(void const *instance, void *thread_instance, RADCLIENT *client, void const *one, void const *two);
+typedef int (*fr_io_track_cmp_t)(void const *instance, void *thread_instance, fr_client_t *client, void const *one, void const *two);
/** Handle an error on the socket.
*
typedef struct {
fr_socket_t socket; //!< src/dst ip and port.
- RADCLIENT const *radclient; //!< old-style client definition
+ fr_client_t const *radclient; //!< old-style client definition
} fr_io_address_t;
typedef int (*fr_io_connection_set_t)(fr_listen_t *li, fr_io_address_t *connection);
-typedef struct rad_client RADCLIENT;
+typedef struct fr_client_s fr_client_t;
-typedef RADCLIENT *(*fr_io_client_find_t)(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto);
+typedef fr_client_t *(*fr_io_client_find_t)(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto);
typedef void (*fr_io_network_get_t)(void *instance, int *ipproto, bool *dynamic_clients, fr_trie_t const **trie);
fr_io_client_state_t state; //!< state of this client
fr_ipaddr_t src_ipaddr; //!< packets come from this address
fr_ipaddr_t network; //!< network for dynamic clients
- RADCLIENT *radclient; //!< old-style definition of this client
+ fr_client_t *radclient; //!< old-style definition of this client
int packets; //!< number of packets using this client
int pending_id; //!< for pending clients
return pending;
}
-static RADCLIENT *radclient_clone(TALLOC_CTX *ctx, RADCLIENT const *parent)
+static fr_client_t *radclient_clone(TALLOC_CTX *ctx, fr_client_t const *parent)
{
- RADCLIENT *c;
+ fr_client_t *c;
if (!parent) return NULL;
- c = talloc_zero(ctx, RADCLIENT);
+ c = talloc_zero(ctx, fr_client_t);
if (!c) return NULL;
/*
fr_io_connection_t *connection;
dl_module_inst_t *dl_inst = NULL;
fr_listen_t *li;
- RADCLIENT *radclient;
+ fr_client_t *radclient;
/*
* Reload the app_io module as a "new" library. This
}
-static RADCLIENT *radclient_alloc(TALLOC_CTX *ctx, int ipproto, fr_io_address_t *address)
+static fr_client_t *radclient_alloc(TALLOC_CTX *ctx, int ipproto, fr_io_address_t *address)
{
- RADCLIENT *radclient;
+ fr_client_t *radclient;
char *shortname;
- MEM(radclient = talloc_zero(ctx, RADCLIENT));
+ MEM(radclient = talloc_zero(ctx, fr_client_t));
fr_value_box_aprint(radclient, &shortname, fr_box_ipaddr(address->socket.inet.src_ipaddr), NULL);
radclient->longname = radclient->shortname = shortname;
* allowed, try to define a dynamic client.
*/
if (!client) {
- RADCLIENT *radclient = NULL;
+ fr_client_t *radclient = NULL;
fr_io_client_state_t state;
fr_ipaddr_t const *network = NULL;
/*
* Create our own local client. This client
* holds our state which really shouldn't go into
- * RADCLIENT.
+ * fr_client_t.
*
* Note that we create a new top-level talloc
* context for this client, as there may be tens
fr_io_connection_t *connection;
fr_io_track_t *track = talloc_get_type_abort(packet_ctx, fr_io_track_t);
fr_io_client_t *client;
- RADCLIENT *radclient;
+ fr_client_t *radclient;
fr_listen_t *child;
fr_event_list_t *el;
/** Group of clients
*
*/
-struct rad_client_list {
+struct fr_client_list_s {
char const *name; //!< Name of the client list.
#ifdef WITH_TRIE
fr_trie_t *v4_udp;
#endif
};
-static RADCLIENT_LIST *root_clients = NULL; //!< Global client list.
+static fr_client_list_t *root_clients = NULL; //!< Global client list.
#ifndef WITH_TRIE
static int8_t client_cmp(void const *one, void const *two)
{
int ret;
- RADCLIENT const *a = one;
- RADCLIENT const *b = two;
+ fr_client_t const *a = one;
+ fr_client_t const *b = two;
ret = fr_ipaddr_cmp(&a->ipaddr, &b->ipaddr);
if (ret != 0) return ret;
/** Free a client
*
- * It's up to the caller to ensure that it's deleted from any RADCLIENT_LIST.
+ * It's up to the caller to ensure that it's deleted from any fr_client_list_t.
*/
-void client_free(RADCLIENT *client)
+void client_free(fr_client_t *client)
{
if (!client) return;
* - New client list on success.
* - NULL on error (OOM).
*/
-RADCLIENT_LIST *client_list_init(CONF_SECTION *cs)
+fr_client_list_t *client_list_init(CONF_SECTION *cs)
{
- RADCLIENT_LIST *clients = talloc_zero(cs, RADCLIENT_LIST);
+ fr_client_list_t *clients = talloc_zero(cs, fr_client_list_t);
if (!clients) return NULL;
* instead do post-processing? Though those two clients can have
* different secrets... and the trie code doesn't allow 2
* fr_trie_user_t nodes in a row. So we would have to instead
- * handle that ourselves, with a wrapper around the RADCLIENT
+ * handle that ourselves, with a wrapper around the fr_client_t
* structure that does udp/tcp/wildcard demultiplexing
*/
-static fr_trie_t *clients_trie(RADCLIENT_LIST const *clients, fr_ipaddr_t const *ipaddr,
+static fr_trie_t *clients_trie(fr_client_list_t const *clients, fr_ipaddr_t const *ipaddr,
int proto)
{
if (ipaddr->af == AF_INET) {
}
#endif /* WITH_TRIE */
-/** Add a client to a RADCLIENT_LIST
+/** Add a client to a fr_client_list_t
*
* @param clients list to add client to, may be NULL if global client list is being used.
* @param client to add.
* - true on success.
* - false on failure.
*/
-bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client)
+bool client_add(fr_client_list_t *clients, fr_client_t *client)
{
#ifdef WITH_TRIE
fr_trie_t *trie;
#else
#endif
- RADCLIENT *old;
+ fr_client_t *old;
char buffer[FR_IPADDR_PREFIX_STRLEN];
if (!client) return false;
* If the client list already exists, use that.
* Otherwise, create a new client list.
*/
- clients = cf_data_value(cf_data_find(cs, RADCLIENT_LIST, NULL));
+ clients = cf_data_value(cf_data_find(cs, fr_client_list_t, NULL));
if (!clients) {
clients = client_list_init(cs);
if (!clients) {
#else /* WITH_TRIE */
if (!clients->tree[client->ipaddr.prefix]) {
- clients->tree[client->ipaddr.prefix] = fr_rb_inline_talloc_alloc(clients, RADCLIENT, node, client_cmp,
+ clients->tree[client->ipaddr.prefix] = fr_rb_inline_talloc_alloc(clients, fr_client_t, node, client_cmp,
NULL);
if (!clients->tree[client->ipaddr.prefix]) {
return false;
}
-void client_delete(RADCLIENT_LIST *clients, RADCLIENT *client)
+void client_delete(fr_client_list_t *clients, fr_client_t *client)
{
#ifdef WITH_TRIE
fr_trie_t *trie;
#endif
}
-RADCLIENT *client_findbynumber(UNUSED const RADCLIENT_LIST *clients, UNUSED int number)
+fr_client_t *client_findbynumber(UNUSED const fr_client_list_t *clients, UNUSED int number)
{
return NULL;
}
/*
- * Find a client in the RADCLIENTS list.
+ * Find a client in the fr_client_tS list.
*/
-RADCLIENT *client_find(RADCLIENT_LIST const *clients, fr_ipaddr_t const *ipaddr, int proto)
+fr_client_t *client_find(fr_client_list_t const *clients, fr_ipaddr_t const *ipaddr, int proto)
{
#ifdef WITH_TRIE
fr_trie_t *trie;
#else
int i, max;
- RADCLIENT my_client, *client;
+ fr_client_t my_client, *client;
#endif
if (!clients) clients = root_clients;
static char const *hs_proto = NULL;
static CONF_PARSER limit_config[] = {
- { FR_CONF_OFFSET("max_connections", FR_TYPE_UINT32, RADCLIENT, limit.max_connections), .dflt = "16" },
+ { FR_CONF_OFFSET("max_connections", FR_TYPE_UINT32, fr_client_t, limit.max_connections), .dflt = "16" },
- { FR_CONF_OFFSET("lifetime", FR_TYPE_TIME_DELTA, RADCLIENT, limit.lifetime), .dflt = "0" },
+ { FR_CONF_OFFSET("lifetime", FR_TYPE_TIME_DELTA, fr_client_t, limit.lifetime), .dflt = "0" },
- { FR_CONF_OFFSET("idle_timeout", FR_TYPE_TIME_DELTA, RADCLIENT, limit.idle_timeout), .dflt = "30s" },
+ { FR_CONF_OFFSET("idle_timeout", FR_TYPE_TIME_DELTA, fr_client_t, limit.idle_timeout), .dflt = "30s" },
CONF_PARSER_TERMINATOR
};
{ FR_CONF_POINTER("src_ipaddr", FR_TYPE_STRING, &cl_srcipaddr) },
- { FR_CONF_OFFSET("require_message_authenticator", FR_TYPE_BOOL, RADCLIENT, message_authenticator), .dflt = "no" },
+ { FR_CONF_OFFSET("require_message_authenticator", FR_TYPE_BOOL, fr_client_t, message_authenticator), .dflt = "no" },
- { FR_CONF_OFFSET("dedup_authenticator", FR_TYPE_BOOL, RADCLIENT, dedup_authenticator), .dflt = "no" },
+ { FR_CONF_OFFSET("dedup_authenticator", FR_TYPE_BOOL, fr_client_t, dedup_authenticator), .dflt = "no" },
- { FR_CONF_OFFSET("secret", FR_TYPE_STRING | FR_TYPE_SECRET, RADCLIENT, secret) },
- { FR_CONF_OFFSET("shortname", FR_TYPE_STRING, RADCLIENT, shortname) },
+ { FR_CONF_OFFSET("secret", FR_TYPE_STRING | FR_TYPE_SECRET, fr_client_t, secret) },
+ { FR_CONF_OFFSET("shortname", FR_TYPE_STRING, fr_client_t, shortname) },
- { FR_CONF_OFFSET("nas_type", FR_TYPE_STRING, RADCLIENT, nas_type) },
+ { FR_CONF_OFFSET("nas_type", FR_TYPE_STRING, fr_client_t, nas_type) },
- { FR_CONF_OFFSET("virtual_server", FR_TYPE_STRING, RADCLIENT, server) },
- { FR_CONF_OFFSET("response_window", FR_TYPE_TIME_DELTA, RADCLIENT, response_window) },
+ { FR_CONF_OFFSET("virtual_server", FR_TYPE_STRING, fr_client_t, server) },
+ { FR_CONF_OFFSET("response_window", FR_TYPE_TIME_DELTA, fr_client_t, response_window) },
- { FR_CONF_OFFSET("track_connections", FR_TYPE_BOOL, RADCLIENT, use_connected) },
+ { FR_CONF_OFFSET("track_connections", FR_TYPE_BOOL, fr_client_t, use_connected) },
{ FR_CONF_POINTER("proto", FR_TYPE_STRING, &hs_proto) },
{ FR_CONF_POINTER("limit", FR_TYPE_SUBSECTION, NULL), .subcs = (void const *) limit_config },
#define TLS_UNUSED UNUSED
#endif
-RADCLIENT_LIST *client_list_parse_section(CONF_SECTION *section, int proto, TLS_UNUSED bool tls_required)
+fr_client_list_t *client_list_parse_section(CONF_SECTION *section, int proto, TLS_UNUSED bool tls_required)
{
bool global = false;
CONF_SECTION *cs = NULL;
- RADCLIENT *c = NULL;
- RADCLIENT_LIST *clients = NULL;
+ fr_client_t *c = NULL;
+ fr_client_list_t *clients = NULL;
CONF_SECTION *server_cs = NULL;
/*
* Be forgiving. If there's already a clients, return
* it. Otherwise create a new one.
*/
- clients = cf_data_value(cf_data_find(section, RADCLIENT_LIST, NULL));
+ clients = cf_data_value(cf_data_find(section, fr_client_list_t, NULL));
if (clients) return clients;
/*
* @param ctx to allocate new clients in.
* @param cs to process as a client.
* @param server_cs The virtual server that this client belongs to.
- * @return new RADCLIENT struct.
+ * @return new fr_client_t struct.
*/
-RADCLIENT *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_SECTION *server_cs)
+fr_client_t *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_SECTION *server_cs)
{
- RADCLIENT *c;
+ fr_client_t *c;
char const *name2;
CONF_PAIR *cp;
/*
* The size is fine.. Let's create the buffer
*/
- c = talloc_zero(ctx, RADCLIENT);
+ c = talloc_zero(ctx, fr_client_t);
c->cs = cs;
memset(&cl_ipaddr, 0, sizeof(cl_ipaddr));
* - New client.
* - NULL on error.
*/
-RADCLIENT *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char const *secret,
+fr_client_t *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char const *secret,
char const *shortname, char const *type, char const *server, bool require_ma)
{
- RADCLIENT *c;
+ fr_client_t *c;
char buffer[128];
- c = talloc_zero(ctx, RADCLIENT);
+ c = talloc_zero(ctx, fr_client_t);
if (fr_inet_pton(&c->ipaddr, identifier, -1, AF_UNSPEC, true, true) < 0) {
PERROR("Failed parsing client IP");
* - New client on success.
* - NULL on error.
*/
-RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, request_t *request)
+fr_client_t *client_afrom_request(TALLOC_CTX *ctx, request_t *request)
{
static int cnt;
CONF_SECTION *cs;
char src_buf[128], buffer[256];
- RADCLIENT *c;
+ fr_client_t *c;
if (!request) return NULL;
* - The new client on success.
* - NULL on failure.
*/
-RADCLIENT *client_read(char const *filename, CONF_SECTION *server_cs, bool check_dns)
+fr_client_t *client_read(char const *filename, CONF_SECTION *server_cs, bool check_dns)
{
char const *p;
- RADCLIENT *c;
+ fr_client_t *c;
CONF_SECTION *cs;
char buffer[256];
/** Search up a list of requests trying to locate one which has a client
*
*/
-RADCLIENT *client_from_request(request_t *request)
+fr_client_t *client_from_request(request_t *request)
{
- RADCLIENT *client;
+ fr_client_t *client;
request_t *parent = request;
do {
extern "C" {
#endif
-typedef struct rad_client RADCLIENT;
-typedef struct rad_client_list RADCLIENT_LIST;
+typedef struct fr_client_s fr_client_t;
+typedef struct fr_client_list_s fr_client_list_t;
/** Callback for retrieving values when building client sections
*
/** Describes a host allowed to send packets to the server
*
*/
-struct rad_client {
+struct fr_client_s {
fr_rb_node_t node; //!< Entry in the client tree.
fr_ipaddr_t ipaddr; //!< IPv4/IPv6 address of the host.
fr_socket_limit_t limit; //!< Connections per client (TCP clients only).
};
-RADCLIENT_LIST *client_list_init(CONF_SECTION *cs);
+fr_client_list_t *client_list_init(CONF_SECTION *cs);
void client_list_free(void);
-RADCLIENT_LIST *client_list_parse_section(CONF_SECTION *section, int proto, bool tls_required);
+fr_client_list_t *client_list_parse_section(CONF_SECTION *section, int proto, bool tls_required);
-void client_free(RADCLIENT *client);
+void client_free(fr_client_t *client);
-bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client);
+bool client_add(fr_client_list_t *clients, fr_client_t *client);
-void client_delete(RADCLIENT_LIST *clients, RADCLIENT *client);
+void client_delete(fr_client_list_t *clients, fr_client_t *client);
-RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, request_t *request);
+fr_client_t *client_afrom_request(TALLOC_CTX *ctx, request_t *request);
int client_map_section(CONF_SECTION *out, CONF_SECTION const *map, client_value_cb_t func, void *data);
-RADCLIENT *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_SECTION *server_cs);
+fr_client_t *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_SECTION *server_cs);
-RADCLIENT *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char const *secret, char const *shortname,
+fr_client_t *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char const *secret, char const *shortname,
char const *type, char const *server, bool require_ma)
CC_HINT(nonnull(2, 3));
-RADCLIENT *client_find(RADCLIENT_LIST const *clients, fr_ipaddr_t const *ipaddr, int proto);
+fr_client_t *client_find(fr_client_list_t const *clients, fr_ipaddr_t const *ipaddr, int proto);
-RADCLIENT *client_findbynumber(RADCLIENT_LIST const *clients, int number);
+fr_client_t *client_findbynumber(fr_client_list_t const *clients, int number);
-RADCLIENT *client_read(char const *filename, CONF_SECTION *server_cs, bool check_dns);
+fr_client_t *client_read(char const *filename, CONF_SECTION *server_cs, bool check_dns);
-RADCLIENT *client_from_request(request_t *request);
+fr_client_t *client_from_request(request_t *request);
#ifdef __cplusplus
}
#endif
typedef struct fr_async_s fr_async_t;
typedef struct request_s request_t;
-typedef struct rad_listen rad_listen_t;
-typedef struct rad_client RADCLIENT;
+typedef struct fr_client_s fr_client_t;
#ifdef __cplusplus
}
fr_radius_packet_t *packet; //!< Incoming request.
fr_radius_packet_t *reply; //!< Outgoing response.
- RADCLIENT *client; //!< The client that originally sent us the request.
+ fr_client_t *client; //!< The client that originally sent us the request.
request_master_state_t master_state; //!< Set by the master thread to signal the child that's currently
//!< working with the request, to do something.
UNUSED fr_snmp_map_t const *map,
NDEBUG_UNUSED void const *snmp_ctx_in, uint32_t index_num)
{
- RADCLIENT *client;
+ fr_client_t *client;
fr_assert(!snmp_ctx_in);
static int snmp_client_index_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out,
UNUSED fr_snmp_map_t const *map, void *snmp_ctx)
{
- RADCLIENT *client = snmp_ctx;
+ fr_client_t *client = snmp_ctx;
fr_assert(client);
static int snmp_client_ipv4addr_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out,
NDEBUG_UNUSED fr_snmp_map_t const *map, void *snmp_ctx)
{
- RADCLIENT *client = snmp_ctx;
+ fr_client_t *client = snmp_ctx;
fr_assert(client);
fr_assert(map->da->type == FR_TYPE_IPV4_ADDR);
static int snmp_client_id_get(TALLOC_CTX *ctx, fr_value_box_t *out,
NDEBUG_UNUSED fr_snmp_map_t const *map, void *snmp_ctx)
{
- RADCLIENT *client = snmp_ctx;
+ fr_client_t *client = snmp_ctx;
fr_assert(client);
fr_assert(map->da->type == FR_TYPE_STRING);
static int snmp_auth_client_stats_offset_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out,
fr_snmp_map_t const *map, void *snmp_ctx)
{
- RADCLIENT *client = snmp_ctx;
+ fr_client_t *client = snmp_ctx;
fr_assert(client);
fr_assert(map->da->type == FR_TYPE_UINT32);
* Some non-packet expansions
*/
if (tmpl_attr_tail_da(vpt) == attr_client_shortname) {
- RADCLIENT *client = client_from_request(request);
+ fr_client_t *client = client_from_request(request);
if (!client || !client->shortname) return 0;
MEM(value = fr_value_box_alloc_null(ctx));
fr_value_box_memdup(ctx, value, tmpl_attr_tail_da(vpt), packet->vector, sizeof(packet->vector), true);
} else if (tmpl_attr_tail_da(vpt) == attr_client_ip_address) {
- RADCLIENT *client = client_from_request(request);
+ fr_client_t *client = client_from_request(request);
if (client) {
MEM(value = fr_value_box_alloc_null(ctx));
fr_value_box_ipaddr(value, NULL, &client->ipaddr, false); /* Enum might not match type */
proto_bfd_t const *inst = talloc_get_type_abort_const(instance, proto_bfd_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_pair_t *vp, *reply, *my, *your;
/*
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
fr_io_track_t *track = talloc_get_type_abort(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
/*
* Process layer NAK, or "Do not respond".
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
bool send_buff_is_set; //!< Whether we were provided with a send_buff
bool dynamic_clients; //!< whether we have dynamic clients
- RADCLIENT_LIST *clients; //!< local clients
+ fr_client_list_t *clients; //!< local clients
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_bfd_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_bfd_udp_t);
- RADCLIENT *client;
+ fr_client_t *client;
/*
* Prefer local clients.
FILE *misc;
fr_cmd_info_t *info; //!< for running commands
- RADCLIENT radclient; //!< for faking out clients
+ fr_client_t radclient; //!< for faking out clients
} proto_control_unix_thread_t;
typedef struct {
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
{
proto_control_unix_thread_t *thread = talloc_get_type_abort(li->thread_instance, proto_control_unix_thread_t);
cron_tab_t tab[5];
- RADCLIENT *client; //!< static client
+ fr_client_t *client; //!< static client
};
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, address->radclient);
+ request->client = UNCONST(fr_client_t *, address->radclient);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
{
proto_cron_crontab_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_cron_crontab_t);
{
proto_cron_crontab_t *inst = talloc_get_type_abort(mctx->inst->data, proto_cron_crontab_t);
CONF_SECTION *conf = mctx->inst->data;
- RADCLIENT *client;
+ fr_client_t *client;
fr_pair_t *vp;
FILE *fp;
bool done = false;
fr_pair_list_init(&inst->pair_list);
- inst->client = client = talloc_zero(inst, RADCLIENT);
+ inst->client = client = talloc_zero(inst, fr_client_t);
if (!inst->client) return 0;
client->ipaddr.af = AF_INET;
fr_rb_node_t filename_node; //!< for dedup
- RADCLIENT *client; //!< so the rest of the server doesn't complain
+ fr_client_t *client; //!< so the rest of the server doesn't complain
};
typedef struct proto_detail_work_thread_s proto_detail_work_thread_t;
static int mod_instantiate(module_inst_ctx_t const *mctx)
{
proto_detail_work_t *inst = talloc_get_type_abort(mctx->inst->data, proto_detail_work_t);
- RADCLIENT *client;
+ fr_client_t *client;
- client = inst->client = talloc_zero(inst, RADCLIENT);
+ client = inst->client = talloc_zero(inst, fr_client_t);
if (!inst->client) return 0;
client->ipaddr.af = AF_INET;
proto_dhcpv4_t const *inst = talloc_get_type_abort_const(instance, proto_dhcpv4_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_radius_packet_t *packet = request->packet;
/*
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
dhcp_packet_t *reply = (dhcp_packet_t *) buffer;
dhcp_packet_t *original = (dhcp_packet_t *) request->packet->data;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
/*
* process layer NAK, or "Do not respond". We also never
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
//!< buffer value.
bool dynamic_clients; //!< whether we have dynamic clients
- RADCLIENT_LIST *clients; //!< local clients
- RADCLIENT *default_client; //!< default 0/0 client
+ fr_client_list_t *clients; //!< local clients
+ fr_client_t *default_client; //!< default 0/0 client
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
}
-static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
fr_io_track_t *track, uint8_t const *packet, size_t packet_len)
{
proto_dhcpv4_track_t *t;
return t;
}
-static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
void const *one, void const *two)
{
int ret;
size_t num;
CONF_ITEM *ci;
CONF_SECTION *server_cs;
- RADCLIENT *client;
+ fr_client_t *client;
inst->cs = conf;
/*
* Create a fake client.
*/
- client = inst->default_client = talloc_zero(inst, RADCLIENT);
+ client = inst->default_client = talloc_zero(inst, fr_client_t);
if (!inst->default_client) return 0;
client->ipaddr.af = AF_INET;
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_dhcpv4_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_dhcpv4_udp_t);
* Prefer local clients.
*/
if (inst->clients) {
- RADCLIENT *client;
+ fr_client_t *client;
client = client_find(inst->clients, ipaddr, ipproto);
if (client) return client;
proto_dhcpv6_t const *inst = talloc_get_type_abort_const(instance, proto_dhcpv6_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_radius_packet_t *packet = request->packet;
/*
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
fr_dhcpv6_packet_t *reply = (fr_dhcpv6_packet_t *) buffer;
fr_dhcpv6_packet_t *original = (fr_dhcpv6_packet_t *) request->packet->data;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
/*
* Process layer NAK, never respond, or "Do not respond".
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
//!< buffer value.
bool dynamic_clients; //!< whether we have dynamic clients
- RADCLIENT_LIST *clients; //!< local clients
- RADCLIENT *default_client; //!< default 0/0 client
+ fr_client_list_t *clients; //!< local clients
+ fr_client_t *default_client; //!< default 0/0 client
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
return 0;
}
-static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
fr_io_track_t *track, uint8_t const *packet, size_t packet_len)
{
proto_dhcpv6_track_t *t;
}
-static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
void const *one, void const *two)
{
int ret;
size_t num;
CONF_ITEM *ci;
CONF_SECTION *server_cs;
- RADCLIENT *client;
+ fr_client_t *client;
CONF_SECTION *conf = mctx->inst->conf;
inst->cs = conf;
/*
* Create a fake client.
*/
- client = inst->default_client = talloc_zero(inst, RADCLIENT);
+ client = inst->default_client = talloc_zero(inst, fr_client_t);
if (!inst->default_client) return 0;
client->ipaddr = (fr_ipaddr_t ) {
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_dhcpv6_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_dhcpv6_udp_t);
* Prefer local clients.
*/
if (inst->clients) {
- RADCLIENT *client;
+ fr_client_t *client;
client = client_find(inst->clients, ipaddr, ipproto);
if (client) return client;
proto_dns_t const *inst = talloc_get_type_abort_const(instance, proto_dns_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_dns_packet_t const *packet = (fr_dns_packet_t const *) data;
fr_dns_ctx_t packet_ctx;
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
bool recv_buff_is_set; //!< Whether we were provided with a receive
//!< buffer value.
- RADCLIENT_LIST *clients; //!< local clients
- RADCLIENT *default_client; //!< default 0/0 client
+ fr_client_list_t *clients; //!< local clients
+ fr_client_t *default_client; //!< default 0/0 client
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
size_t num;
CONF_ITEM *ci;
CONF_SECTION *server_cs;
- RADCLIENT *client;
+ fr_client_t *client;
inst->cs = conf;
/*
* Create a fake client.
*/
- client = inst->default_client = talloc_zero(inst, RADCLIENT);
+ client = inst->default_client = talloc_zero(inst, fr_client_t);
if (!inst->default_client) return 0;
client->ipaddr = (fr_ipaddr_t ) {
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_dns_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_dns_udp_t);
* Prefer local clients.
*/
if (inst->clients) {
- RADCLIENT *client;
+ fr_client_t *client;
client = client_find(inst->clients, ipaddr, ipproto);
if (client) return client;
int code;
uint32_t max_attributes; //!< Limit maximum decodable attributes
- RADCLIENT *client; //!< static client
+ fr_client_t *client; //!< static client
fr_load_config_t load; //!< load configuration
bool repeat; //!, do we repeat the load generation
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, address->radclient);
+ request->client = UNCONST(fr_client_t *, address->radclient);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, UNUSED fr_ipaddr_t const *ipaddr, UNUSED int ipproto)
{
proto_load_step_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_load_step_t);
{
proto_load_step_t *inst = talloc_get_type_abort(mctx->inst->data, proto_load_step_t);
CONF_SECTION *conf = mctx->inst->conf;
- RADCLIENT *client;
+ fr_client_t *client;
fr_pair_t *vp;
fr_pair_list_init(&inst->pair_list);
- inst->client = client = talloc_zero(inst, RADCLIENT);
+ inst->client = client = talloc_zero(inst, fr_client_t);
if (!inst->client) return 0;
client->ipaddr.af = AF_INET;
proto_radius_t const *inst = talloc_get_type_abort_const(instance, proto_radius_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_assert(data[0] < FR_RADIUS_CODE_MAX);
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
fr_io_track_t *track = talloc_get_type_abort(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
/*
* Process layer NAK, or "Do not respond".
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
bool dynamic_clients; //!< whether we have dynamic clients
bool dedup_authenticator; //!< dedup using the request authenticator
- RADCLIENT_LIST *clients; //!< local clients
+ fr_client_list_t *clients; //!< local clients
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
return 0;
}
-static int mod_track_compare(void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static int mod_track_compare(void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
void const *one, void const *two)
{
int ret;
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_radius_tcp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_radius_tcp_t);
* Prefer local clients.
*/
if (inst->clients) {
- RADCLIENT *client;
+ fr_client_t *client;
client = client_find(inst->clients, ipaddr, ipproto);
if (client) return client;
bool dynamic_clients; //!< whether we have dynamic clients
bool dedup_authenticator; //!< dedup using the request authenticator
- RADCLIENT_LIST *clients; //!< local clients
+ fr_client_list_t *clients; //!< local clients
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
return 0;
}
-static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
fr_io_track_t *track, uint8_t const *packet, UNUSED size_t packet_len)
{
return talloc_memdup(track, packet, RADIUS_HEADER_LENGTH);
}
-static int mod_track_compare(void const *instance, UNUSED void *thread_instance, RADCLIENT *client,
+static int mod_track_compare(void const *instance, UNUSED void *thread_instance, fr_client_t *client,
void const *one, void const *two)
{
int ret;
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_radius_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_radius_udp_t);
- RADCLIENT *client;
+ fr_client_t *client;
/*
* Prefer local clients.
proto_tacacs_t const *inst = talloc_get_type_abort_const(instance, proto_tacacs_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
int code = -1;
fr_tacacs_packet_t const *pkt = (fr_tacacs_packet_t const *)data;
char const *secret;
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
fr_io_track_t *track = talloc_get_type_abort(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
char const *secret;
size_t secretlen = 0;
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
bool recv_buff_is_set; //!< Whether we were provided with a recv_buff
bool dynamic_clients; //!< whether we have dynamic clients
- RADCLIENT_LIST *clients; //!< local clients
+ fr_client_list_t *clients; //!< local clients
fr_trie_t *trie; //!< for parsed networks
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
return 0;
}
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_tacacs_tcp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_tacacs_tcp_t);
* Prefer local clients.
*/
if (inst->clients) {
- RADCLIENT *client;
+ fr_client_t *client;
client = client_find(inst->clients, ipaddr, ipproto);
if (client) return client;
proto_vmps_t const *inst = talloc_get_type_abort_const(instance, proto_vmps_t);
fr_io_track_t const *track = talloc_get_type_abort_const(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_radius_packet_t *packet = request->packet;
fr_assert(data[0] < FR_VMPS_CODE_MAX);
/*
* Set the rest of the fields.
*/
- request->client = UNCONST(RADCLIENT *, client);
+ request->client = UNCONST(fr_client_t *, client);
request->packet->socket = address->socket;
fr_socket_addr_swap(&request->reply->socket, &address->socket);
fr_io_track_t *track = talloc_get_type_abort(request->async->packet_ctx, fr_io_track_t);
fr_io_address_t const *address = track->address;
ssize_t data_len;
- RADCLIENT const *client;
+ fr_client_t const *client;
fr_dcursor_t cursor;
/*
* Dynamic client stuff
*/
if (client->dynamic && !client->active) {
- RADCLIENT *new_client;
+ fr_client_t *new_client;
fr_assert(buffer_len >= sizeof(client));
fr_ipaddr_t *allow; //!< allowed networks for dynamic clients
fr_ipaddr_t *deny; //!< denied networks for dynamic clients
- RADCLIENT_LIST *clients; //!< local clients
+ fr_client_list_t *clients; //!< local clients
} proto_vmps_udp_t;
return 0;
}
-static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static void *mod_track_create(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
fr_io_track_t *track, uint8_t const *buffer, size_t buffer_len)
{
proto_vmps_track_t *t;
return t;
}
-static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED RADCLIENT *client,
+static int mod_track_compare(UNUSED void const *instance, UNUSED void *thread_instance, UNUSED fr_client_t *client,
void const *one, void const *two)
{
proto_vmps_track_t const *a = talloc_get_type_abort_const(one, proto_vmps_track_t);
// @todo - allow for "wildcard" clients, which allow anything
// and then rely on "networks" to filter source IPs...
// which means we probably want to filter on "networks" even if there are no dynamic clients
-static RADCLIENT *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
+static fr_client_t *mod_client_find(fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto)
{
proto_vmps_udp_t const *inst = talloc_get_type_abort_const(li->app_io_instance, proto_vmps_udp_t);
- RADCLIENT *client;
+ fr_client_t *client;
/*
* Prefer local clients.
{
rlm_rcode_t rcode = RLM_MODULE_OK;
map_t const *map = NULL;
- RADCLIENT *client;
+ fr_client_t *client;
client_get_vp_ctx_t uctx;
if (!fr_value_box_list_empty(client_override)) {
char const *value = NULL;
fr_ipaddr_t ip;
CONF_PAIR *cp;
- RADCLIENT *client = NULL;
+ fr_client_t *client = NULL;
fr_value_box_t *field = fr_value_box_list_head(in);
fr_value_box_t *client_ip = fr_value_box_list_next(in, field);
fr_value_box_t *vb;
char const *value;
CONF_PAIR *cp;
char buffer[2048];
- RADCLIENT *client;
+ fr_client_t *client;
/*
* Ensure we're only being called from the main thread,
json_object *json, *j_value; /* json object holders */
json_object *jrows = NULL; /* json object to hold view rows */
CONF_SECTION *client; /* freeradius config list */
- RADCLIENT *c; /* freeradius client */
+ fr_client_t *c; /* freeradius client */
/* get handle */
handle = fr_pool_connection_get(inst->pool, NULL);
rlm_opendirectory_t const *inst = talloc_get_type_abort_const(mctx->inst->data, rlm_opendirectory_t);
struct passwd *userdata = NULL;
int ismember = 0;
- RADCLIENT *client = NULL;
+ fr_client_t *client = NULL;
uuid_t uuid;
uuid_t guid_sacl;
uuid_t guid_nasgroup;
rlm_radius_t const *inst = talloc_get_type_abort_const(mctx->inst->data, rlm_radius_t);
rlm_rcode_t rcode;
unlang_action_t ua;
- RADCLIENT *client;
+ fr_client_t *client;
void *rctx = NULL;
char *filename = NULL;
char *expanded = NULL;
- RADCLIENT *client;
+ fr_client_t *client;
if (request->dict != dict_radius) RETURN_MODULE_NOOP;
#endif
uint32_t nas_port = 0;
bool port_seen = true;
- RADCLIENT *client;
+ fr_client_t *client;
/*
* No radwtmp. Don't do anything.
fr_pair_t *pair;
uint32_t port = 0; /* RFC 2865 NAS-Port is 4 bytes */
char const *tls = "";
- RADCLIENT *client = client_from_request(request);
+ fr_client_t *client = client_from_request(request);
cli = fr_pair_find_by_da(&request->request_pairs, NULL, attr_calling_station_id);
static char *auth_name(char *buf, size_t buflen, request_t *request)
{
char const *tls = "";
- RADCLIENT *client = client_from_request(request);
+ fr_client_t *client = client_from_request(request);
if (request->packet->socket.inet.dst_port == 0) tls = " via proxy to virtual server";
fr_pair_t *pair;
uint32_t port = 0; /* RFC 2865 NAS-Port is 4 bytes */
char const *tls = "";
- RADCLIENT *client = client_from_request(request);
+ fr_client_t *client = client_from_request(request);
cli = fr_pair_find_by_da(&request->request_pairs, NULL, attr_calling_station_id);