rad_assert(inst->io->bootstrap != NULL);
rad_assert(inst->io->instantiate != NULL);
+ /*
+ * Get random Proxy-State identifier for this module.
+ */
+ inst->proxy_state = fr_rand();
+
/*
* Bootstrap the submodule.
*/
void *io_instance; //!< Easy access to the IO instance
CONF_SECTION *io_conf; //!< Easy access to the IO config section
+ uint32_t proxy_state; //!< Unique ID (mostly) of this module.
+
uint32_t *types; //!< array of allowed packet types
int allowed[FR_MAX_PACKET_CODE];
rlm_radius_retry_t retry[FR_MAX_PACKET_CODE];
fr_connection_t *conn; //!< Connection to our destination.
char const *name; //!< from IP PORT to IP PORT
- uint32_t proxy_state; //!< ID of this connection
fr_dlist_t entry; //!< in the linked list of connections
int heap_id; //!< for the active heap
rlm_radius_udp_connection_state_t state; //!< state of the connection
attr[0] = FR_PROXY_STATE;
attr[1] = 6;
- memcpy(attr + 2, &c->proxy_state, 4);
+ memcpy(attr + 2, &c->inst->parent->proxy_state, 4);
hdr_len = (c->buffer[2] << 8) | (c->buffer[3]);
hdr_len += 6;
if (radlog_debug_enabled(L_DBG, L_DBG_LVL_2, request)) {
RINDENT();
- RDEBUG2("&Proxy-State := 0x%08x", c->proxy_state);
+ RDEBUG2("&Proxy-State := 0x%08x", c->inst->parent->proxy_state);
REXDENT();
}
c->name = talloc_asprintf(c, "proto udp local %s port %u remote %s port %u",
src_buf, c->src_port,
dst_buf, c->dst_port);
- c->proxy_state = fr_rand();
c->state = CONN_OPENING;
/*