[Home]

Summary:ASTERISK-17926: The retrans_pkt function can corrupt the message list in the gateway structure
Reporter:Jeff Waltz (jeffw)Labels:
Date Opened:2011-05-25 15:46:21Date Closed:2012-01-26 09:19:47.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_mgcp
Versions:1.8.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I believe there are errors in the retrans_pkt function when a max retries exceeded error occurs.  In the "for" statement the 'prev" variable is set to an incorrect value when a message in the list has exceeded its retries.  It should remain unchanged, but the "for" statement will set "prev" to point to the message just removed.  This could corrupt the list.

The code attempts to build a list of expired messages using the same "next" field as used to link the active message list.  This corrupts the value of "cur->next" which is used to process the rest of the active message list.  It will be set to null or point to the expired message list.

****** ADDITIONAL INFORMATION ******

I made the following changes to my version of chan_mgcp.c:
<inline code removed by lmadsen>
Comments:By: Leif Madsen (lmadsen) 2011-05-27 10:57:16

Please post your patches as a unified diff as a text file attachment to this issue after signing the license agreement.

By: Jeff Waltz (jeffw) 2011-06-02 15:17:09

Here is the diff of the changes I made to correct this problem:

[EDIT]
In comment patch removed

By: Matt Jordan (mjordan) 2011-12-14 09:27:23.608-0600

I've edited out and removed the patch in your comment.  As Leif noted, patches *must* be provided as a unified diff attached to the issue, such that the license agreement is signed.  Please post your patch to this issue.

By: Matt Jordan (mjordan) 2012-01-26 09:19:42.359-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines