MT#55283 use correct password for STUN errors

We're supposed to use the remote password for sending STUN error
responses (same as for sending STUN success responses), not the local
one.

Fixes a bug from 2015.

Closes #1626

Change-Id: I975178405dcd41661bdc5e0c1208295f9db70006
pull/1640/head
Richard Fuchs 3 years ago
parent 1457b34f65
commit 394ed2fc62

@ -417,7 +417,7 @@ static void stun_error_len(struct stream_fd *sfd, const endpoint_t *sin,
if (attr_cont)
output_add_data_wr(&mh, &aa, add_attr, attr_cont, attr_len);
integrity(&mh, &mi, &sfd->stream->media->ice_agent->pwd[0]);
integrity(&mh, &mi, &sfd->stream->media->ice_agent->pwd[1]);
fingerprint(&mh, &fp);
output_finish_src(&mh);
@ -488,7 +488,6 @@ static int check_auth(const str *msg, struct stun_attrs *attrs, struct call_medi
return memcmp(digest, attrs->msg_integrity.s, 20) ? -1 : 0;
}
/* XXX way too many parameters being passed around here, unify into a struct */
static int stun_binding_success(struct stream_fd *sfd, struct header *req, struct stun_attrs *attrs,
const endpoint_t *sin)
{

Loading…
Cancel
Save