char const *name; //!< socket name
int sockfd;
- bool seen_first_packet;
- bool single_connection;
-
fr_io_address_t *connection; //!< for connected sockets.
fr_stats_t stats; //!< statistics for this socket
*recv_time_p = fr_time();
thread->stats.total_requests++;
- /*
- * See if we negotiated multiple sessions on a single
- * connection.
- */
- if (!thread->seen_first_packet) {
- fr_tacacs_packet_t *pkt = (fr_tacacs_packet_t *) buffer;
-
- thread->seen_first_packet = true;
- thread->single_connection = ((pkt->hdr.flags & FR_FLAGS_VALUE_SINGLE_CONNECT) != 0);
- }
-
/*
* proto_tacacs sets the priority
*/
{
proto_tacacs_tcp_thread_t *thread = talloc_get_type_abort(li->thread_instance, proto_tacacs_tcp_thread_t);
ssize_t data_size;
- fr_tacacs_packet_t *pkt;
/*
* We only write TACACS packets.
* put the stats in the listener, so that proto_tacacs
* can update them, too.. <sigh>
*/
- pkt = (fr_tacacs_packet_t *) buffer;
if (written == 0) {
thread->stats.total_responses++;
-
- /*
- * If this is the first reply, then ACK the single connection flag.
- */
- if (thread->single_connection) {
- thread->single_connection = false;
- pkt->hdr.flags |= FR_FLAGS_VALUE_SINGLE_CONNECT;
- }
}
/*
*/
if (original) {
/*
- * Make room and fill up the original header. Ah! we shouldn't just copy the original packet,
+ * Make room and fill up the original header. We shouldn't just copy the original packet,
* because the fields 'seq_no' and 'length' are not the same.
*/
FR_DBUFF_ADVANCE_RETURN(&work_dbuff, sizeof(fr_tacacs_packet_hdr_t));
packet->hdr.version = original->version;
packet->hdr.type = original->type;
- packet->hdr.flags = original->flags;
+ packet->hdr.flags = original->flags; /* encrypted && single connection */
packet->hdr.session_id = original->session_id;
}