[Asterisk-bugs] [Asterisk 0010227]: Incorrect handling of VNAK retransmission

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Jul 18 15:33:41 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10227 
====================================================================== 
Reported By:                mihai
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   10227
Category:                   Channels/chan_iax2
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.7.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             07-18-2007 09:49 CDT
Last Modified:              07-18-2007 15:33 CDT
====================================================================== 
Summary:                    Incorrect handling of VNAK retransmission
Description: 
In vnak_retransmit you can find the following code:

if ((f->callno == callno) && iaxs[f->callno] &&
	(f->oseqno >= last)) {
	send_packet(f);

oseqno and last are 8-bit values that wrap around, so if a VNAK
retransmission is requested right after a wraparound, this code will behave
incorrectly. 

Most probable effect would be that asterisk would not retransmitting the
right frames and the other endpoint would keep asking for them, generating
a VNAK storm
====================================================================== 

---------------------------------------------------------------------- 
 mihai - 07-18-07 15:33  
---------------------------------------------------------------------- 
Russell, thanks for looking into this.
One simple way of sixing this particular issue would be to use the
following code in vnak_retransmit

if ((f->callno == callno) && iaxs[f->callno] &&
	((unsigned char)(f->oseqno - last) < 128)) {
	send_packet(f);
}

It is pretty much equivalent to the old code, but it takes wraparounds
into account 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-18-07 15:33  mihai          Note Added: 0067546                          
======================================================================




More information about the asterisk-bugs mailing list