MT#55283 Defuse kernelize error for SRTP encryption not yet negotiated

Similar in spirit to f2d57de078, but for
the encrypt case.

Closes #2127

Change-Id: I06c82f4a1d768a863922e2240aebb6c1d243e269
(cherry picked from commit e6469c006b)
mr13.5
Alexander Bakker 1 month ago committed by Richard Fuchs
parent 411656a913
commit 46e89e94ca

@ -1631,7 +1631,7 @@ static const char *kernelize_target(kernelize_state *s, struct packet_stream *st
int ret = handler->in->kernel(&reti->decrypt, stream);
if (ret) {
ilog(LOG_NOTICE, "SRTP not yet negotiated");
ilog(LOG_NOTICE, "Decryption SRTP not yet negotiated");
return NULL;
}
if (!reti->decrypt.cipher || !reti->decrypt.hmac)
@ -1835,7 +1835,14 @@ static const char *kernelize_one(kernelize_state *s,
}
}
handler->out->kernel(&redi->output.encrypt, sink);
int ret = handler->out->kernel(&redi->output.encrypt, sink);
if (ret) {
if (sink != stream)
mutex_unlock(&sink->lock);
g_free(redi);
ilog(LOG_NOTICE, "Encryption SRTP not yet negotiated");
return NULL;
}
if (sink != stream)
mutex_unlock(&sink->lock);

Loading…
Cancel
Save