|
|
|
@ -1349,8 +1349,10 @@ static int __k_srtp_crypt(struct rtpengine_srtp *s, struct crypto_context *c, |
|
|
|
.rtp_auth_tag_len= c->params.crypto_suite->srtp_auth_tag, |
|
|
|
.rtcp_auth_tag_len= c->params.crypto_suite->srtcp_auth_tag, |
|
|
|
}; |
|
|
|
for (unsigned int i = 0; i < RTPE_NUM_SSRC_TRACKING; i++) |
|
|
|
for (unsigned int i = 0; i < RTPE_NUM_SSRC_TRACKING; i++) { |
|
|
|
s->last_rtp_index[i] = ssrc_ctx[i] ? ssrc_ctx[i]->srtp_index : 0; |
|
|
|
s->last_rtcp_index[i] = ssrc_ctx[i] ? ssrc_ctx[i]->srtcp_index : 0; |
|
|
|
} |
|
|
|
if (c->params.mki_len) |
|
|
|
memcpy(s->mki, c->params.mki, c->params.mki_len); |
|
|
|
memcpy(s->master_key, c->params.master_key, c->params.crypto_suite->master_key_len); |
|
|
|
@ -1796,6 +1798,27 @@ static void __stream_consume_stats(struct packet_stream *ps, const struct rtpeng |
|
|
|
|
|
|
|
mutex_unlock(&sink->out_lock); |
|
|
|
} |
|
|
|
|
|
|
|
for (GList *l = ps->rtcp_sinks.head; l; l = l->next) { |
|
|
|
struct sink_handler *sh = l->data; |
|
|
|
struct packet_stream *sink = sh->sink; |
|
|
|
|
|
|
|
if (mutex_trylock(&sink->out_lock)) |
|
|
|
continue; // will have to skip this |
|
|
|
|
|
|
|
ssrc_ctx = __hunt_ssrc_ctx(ssrc, sink->ssrc_out, u); |
|
|
|
if (!ssrc_ctx) |
|
|
|
ssrc_ctx = __hunt_ssrc_ctx(ssrc_map_out, sink->ssrc_out, u); |
|
|
|
|
|
|
|
if (ssrc_ctx) { |
|
|
|
if (sh->kernel_output_idx >= 0) { |
|
|
|
ssrc_ctx->srtcp_index |
|
|
|
= stats_info->last_rtcp_index[sh->kernel_output_idx][u]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
mutex_unlock(&sink->out_lock); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -3501,6 +3524,10 @@ enum thread_looper_action kernel_stats_updater(void) { |
|
|
|
ctx->srtp_index = o->encrypt.last_rtp_index[u]; |
|
|
|
update = true; |
|
|
|
} |
|
|
|
if (ctx->srtcp_index != o->encrypt.last_rtcp_index[u]) { |
|
|
|
ctx->srtcp_index = o->encrypt.last_rtcp_index[u]; |
|
|
|
update = true; |
|
|
|
} |
|
|
|
} |
|
|
|
mutex_unlock(&sink->out_lock); |
|
|
|
} |
|
|
|
|