From: Joshua Colp Date: Mon, 9 Apr 2007 12:33:49 +0000 (+0000) Subject: Make RTP session ID and session version generation random. (issue #9456 reported... X-Git-Tag: 1.6.0-beta1~3^2~2882 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4bef3bb3a3da5978bf873c23697688a4afbb4cd;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a954ba36fc..9f6805911a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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++;