Review Board 1.7.16


when using FEC, asterisk considers negative sequence numbers as missing

Review Request #3657 - Created June 20, 2014 and submitted

Torrey Searle
ASTERISK-23908
Reviewers
asterisk-dev
Asterisk
When using FEC error correction with span=3 and entries=4 asterisk will try to repair in packet with sequence number 5 because it will see that packet -4 is missing. The result is that Asterisk will forward garbage packets that can possibly kill the fax.

This patch adds a check to see if the sequence number is valid before checking if the packet is missing
Replayed the T.38 FEC callflow using a version of SIPP patched to understand m=image for pcapplay

Diff revision 1 (Latest)

  1. trunk/main/udptl.c: Loading...
trunk/main/udptl.c
Revision 416335 New Change
[20] 532 lines
[+20] [+] static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, unsigned int len)
533
				continue;
533
				continue;
534
			for (m = 0; m < s->rx[l].fec_entries; m++) {
534
			for (m = 0; m < s->rx[l].fec_entries; m++) {
535
				int k;
535
				int k;
536
				int which;
536
				int which;
537
				int limit = (l + m) & UDPTL_BUF_MASK;
537
				int limit = (l + m) & UDPTL_BUF_MASK;

    
   
538

   

    
   
539
				/* only repair buffers that actually exist! */

    
   
540
				if (seq_no <= (s->rx[l].fec_span * s->rx[l].fec_entries) - m) {

    
   
541
					continue;

    
   
542
				}

    
   
543

   
538
				for (which = -1, k = (limit - s->rx[l].fec_span * s->rx[l].fec_entries) & UDPTL_BUF_MASK; k != limit; k = (k + s->rx[l].fec_entries) & UDPTL_BUF_MASK) {
544
				for (which = -1, k = (limit - s->rx[l].fec_span * s->rx[l].fec_entries) & UDPTL_BUF_MASK; k != limit; k = (k + s->rx[l].fec_entries) & UDPTL_BUF_MASK) {
539
					if (s->rx[k].buf_len <= 0)
545
					if (s->rx[k].buf_len <= 0)
540
						which = (which == -1) ? k : -2;
546
						which = (which == -1) ? k : -2;
541
				}
547
				}
542
				if (which >= 0) {
548
				if (which >= 0) {
[+20] [20] 859 lines
  1. trunk/main/udptl.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.