TT#14008 add extra logging for SRTP/SSRC updates

Change-Id: I564193c919563ec14c61db1031f696d5029e6e40
(cherry picked from commit 014301bee8)
mr9.5.4
Richard Fuchs 3 years ago
parent 8093fd2ee9
commit c6d5001220

@ -600,6 +600,8 @@ static void call_timer(void *ptr) {
if (!sfd)
goto next;
log_info_stream_fd(sfd);
rwlock_lock_r(&sfd->call->master_lock);
ps = sfd->stream;
@ -660,6 +662,10 @@ static void call_timer(void *ptr) {
&& ntohl(ke->target.ssrc) == sink->ssrc_out->parent->h.ssrc
&& ke->target.encrypt.last_index - sink->ssrc_out->srtp_index > 0x4000)
{
ilog(LOG_DEBUG, "Updating SRTP encryption index from %" PRIu64
" to %" PRIu64,
sink->ssrc_out->srtp_index,
ke->target.encrypt.last_index);
sink->ssrc_out->srtp_index = ke->target.encrypt.last_index;
update = 1;
}
@ -672,12 +678,17 @@ static void call_timer(void *ptr) {
atomic64_add(&ps->ssrc_in->octets, diff_bytes);
atomic64_add(&ps->ssrc_in->packets, diff_packets);
atomic64_set(&ps->ssrc_in->last_seq, ke->target.decrypt.last_index);
ps->ssrc_in->srtp_index = ke->target.decrypt.last_index;
if (sfd->crypto.params.crypto_suite
&& ke->target.decrypt.last_index
- ps->ssrc_in->srtp_index > 0x4000)
- ps->ssrc_in->srtp_index > 0x4000) {
ilog(LOG_DEBUG, "Updating SRTP decryption index from %" PRIu64
" to %" PRIu64,
ps->ssrc_in->srtp_index,
ke->target.decrypt.last_index);
ps->ssrc_in->srtp_index = ke->target.decrypt.last_index;
update = 1;
}
}
mutex_unlock(&ps->in_lock);
}
@ -694,6 +705,7 @@ next:
i = g_list_delete_link(i, i);
if (sfd)
obj_put(sfd);
log_info_clear();
}
l = g_hash_table_get_values(hlp.addr_sfd);

@ -1561,7 +1561,8 @@ static void proc_list_crypto_print(struct seq_file *f, struct re_crypto_context
seq_printf(f, "%02x", c->session_auth_key[i]);
seq_printf(f, "\n");
seq_printf(f, " ROC: %u\n", (unsigned int) c->roc);
seq_printf(f, " ROC: %u (%lu)\n", (unsigned int) c->roc,
(unsigned long) s->last_index[i]);
if (s->mki_len)
seq_printf(f, " MKI: length %u, %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x...\n",

Loading…
Cancel
Save