Skip to content

Commit 42e52fd

Browse files
mtryfossrfuchs
authored andcommitted
MT#55283 Reject OSRTP answer when not offered
Closes #1854 Change-Id: I3020166b67005b0ecf7970104dbecb36885b021e
1 parent ee2e976 commit 42e52fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

daemon/call.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,8 +2359,12 @@ static void __update_media_protocol(struct call_media *media, struct call_media
23592359
media->protocol = NULL; // reject
23602360
}
23612361
// pass through any other protocol change?
2362-
else if (!flags->protocol_accept)
2363-
;
2362+
else if (!flags->protocol_accept) {
2363+
if (media->protocol && sp->protocol && !media->protocol->osrtp && sp->protocol->osrtp) {
2364+
ilog(LOG_WARNING, "Ignore OSRTP answer since this was not offered");
2365+
other_media->protocol = media->protocol;
2366+
}
2367+
}
23642368
else
23652369
media->protocol = NULL;
23662370
}

0 commit comments

Comments
 (0)