[asterisk-bugs] [JIRA] (ASTERISK-24873) Cancelling transmission of IAX2 packet loop wrap around

Y Ateya (JIRA) noreply at issues.asterisk.org
Mon Mar 23 16:01:34 CDT 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Y Ateya updated ASTERISK-24873:
-------------------------------

    Severity: Major  (was: Minor)

> Cancelling transmission of IAX2 packet loop wrap around
> -------------------------------------------------------
>
>                 Key: ASTERISK-24873
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24873
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_iax2
>    Affects Versions: 13.2.0
>            Reporter: Y Ateya
>         Attachments: client_logs_cancelling_packet_issue.txt.bz2, use_case.txt
>
>
> In IAX, when a packet is received with sequence number, all not-yet-ACKed packets with lower sequence number shall be considered ACKed.
> Sometimes after VNAK is recieved, the first packet sequence number makes the for loop run for useless 255 times.
> check attachment: use_case.txt for extracted sequence of packets.
> check attachment: client_logs_cancelling_packet_issue.txt.bz2 for a full log with many occurrences of this issue.
> {code:title=The affected for loop|borderStyle=solid}
> 			/* First we have to qualify that the ACKed value is within our window */
> 			if (iaxs[fr->callno]->rseqno >= iaxs[fr->callno]->oseqno || (fr->iseqno >= iaxs[fr->callno]->rseqno && fr->iseqno < iaxs[fr->callno]->oseqno))
> 				x = fr->iseqno;
> 			else
> 				x = iaxs[fr->callno]->oseqno;
> 			if ((x != iaxs[fr->callno]->oseqno) || (iaxs[fr->callno]->oseqno == fr->iseqno)) {
> 				/* The acknowledgement is within our window.  Time to acknowledge everything
> 				   that it says to */
> 				for (x=iaxs[fr->callno]->rseqno; x != fr->iseqno; x++) {
> 					/* Ack the packet with the given timestamp */
> 					if (iaxdebug)
> 						ast_debug(1, "Cancelling transmission of packet %d\n", x);
> {code}
> "Cancelling transmission of packet X" shall be printed only for packets with lower sequence number than received packet.
> Simple solution of using `<` for checking end of loop is not enough as it don't handle sequence number wrap around.
> Note that there is not functional effect of this issue. It just blocks its thread in useless 255 loop.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list