mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-16 04:36:49 +00:00
Make RTP session ID and session version generation random. (issue #9456 reported by tjardick)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+2
-2
@@ -6481,7 +6481,7 @@ static int add_t38_sdp(struct sip_request *resp, struct sip_pvt *p)
|
||||
}
|
||||
|
||||
if (!p->sessionid) {
|
||||
p->sessionid = getpid();
|
||||
p->sessionid = (int)ast_random();
|
||||
p->sessionversion = p->sessionid;
|
||||
} else
|
||||
p->sessionversion++;
|
||||
@@ -6668,7 +6668,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p)
|
||||
|
||||
/* Set RTP Session ID and version */
|
||||
if (!p->sessionid) {
|
||||
p->sessionid = getpid();
|
||||
p->sessionid = (int)ast_random();
|
||||
p->sessionversion = p->sessionid;
|
||||
} else
|
||||
p->sessionversion++;
|
||||
|
||||
Reference in New Issue
Block a user