Wrong packet decision in FO state

Bug #767354 reported by Klaus Warnke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
1.2.x
Won't Fix
Medium
Didier Barvaux
1.3.x
Won't Fix
Medium
Didier Barvaux
Rohc-main
Fix Released
Medium
Didier Barvaux

Bug Description

Test ipv4/ipv4/udp/rtp/mp3-variable-pt packet 12 uor-2-id can not be decompressed.
outer ip-id is constant 0, inner is nbo +1.
c_generic.c: decide_FO_packet() line 2522

                        if( (!is_ip_v4 || is_rnd) && (!is_ip2_v4 || is_rnd2))
                                packet = PACKET_UOR_2_RTP;
                        else if(nr_ts_bits <= MAX_BITS_IN_4_BYTE_SDVL &&
                                (is_ip_v4 && nr_ip_id_bits > 0 &&
                                 (!is_ip_v4 || is_rnd2 || nr_ip_id_bits2 == 0)))
                                packet = PACKET_UOR_2_ID;
                        else
                                packet = PACKET_UOR_2_TS;

(gdb) p is_rnd
$38 = 1
(gdb) p is_ip_v4
$36 = 1
$37 = 16
(gdb) p is_rnd2
$41 = 0
(gdb) p nr_ip_id_bits2
$42 = 0

outer ip is rnd, therefore nr_ip_id_bits==16.
In this case, the ip-id is transmitted in packet remainder, not here.
but

                                (is_ip_v4 && nr_ip_id_bits > 0 &&

does not take this into account.
fix:

                                (is_ip_v4 && !is_rnd && nr_ip_id_bits > 0 &&

This also needs improvement:

                                 (!is_ip_v4 || is_rnd2 || nr_ip_id_bits2 == 0)))

Because it is possible to use uor-2-id to send <=5bits of ip-id-2 bits,
if outer ip-id is rnd/not present (->not compressible).

regards, Klaus

Tags: library
Revision history for this message
Klaus Warnke (k-warnke) wrote :

--- src/comp/c_generic.c 2010-08-22 14:00:49 +0000
+++ src/comp/c_generic.c 2011-05-11 15:43:40 +0000
@@ -2713,7 +2719,7 @@
                                packet = PACKET_UOR_2_RTP;
                        }
                        else if(nr_ts_bits <= MAX_BITS_IN_4_BYTE_SDVL &&
- (is_ip_v4 && nr_ip_id_bits > 0 &&
+ (is_ip_v4 && !is_rnd && nr_ip_id_bits > 0 &&
                                 (!is_ip_v4 || is_rnd2 || nr_ip_id_bits2 == 0)))
                        {
                                packet = PACKET_UOR_2_ID;

summary: - packet decision in FO state
+ Wrong packet decision in FO state
tags: added: library
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Confirmed in 1.2.x releases.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Confirmed in 1.3.x releases.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Confirmed in trunk.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Fix committed in trunk, see http://bazaar.launchpad.net/~didier-barvaux/rohc/main/revision/311. Scheduled for release 1.4.0. Thanks Klaus for the bug report.

Fix the way IP-ID is handled in case there are 2 IP headers: the base headers
contains the IP-ID bits of the innermost IPv4 header with a non-random IP-ID,
not the IP-ID bits of the outer IPv4 header.

Do achieve that:
 - add some code to determine the innermost IPv4 header with a non-random IP-ID,
 - add debug traces to print the conditions that make the library select a
   packet type,
 - force values in the packet_type_t enum to be sure they do not change from one
   platform to another,
 - introduce a new non-regression test that causes the IP-ID problems,
 - introduce a new rohc_utils.h headers that defines some utils (min and max
   macros currently),
 - fix a small problem that transmitted TS bits even if they were deductible
   from the SN value (small compression gain expected).

Note 1: the format of the ROHC is altered by this changeset, so compatibility
               with previous revision is not ensured.

Note 2: the algorithm that decides the packet type is not optimal, it should
               be reworked in the future.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

The bug will not be fixed in the 1.3.x branch since it would break compatibility between 1.3.x releases. A note about the bug was added in the README file.
See http://bazaar.launchpad.net/~didier-barvaux/rohc/1.3.x/revision/180

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

The bug will not be fixed in the 1.2.x branch since it would break compatibility between 1.2.x releases. A note about the bug was added in the README file.
See http://bazaar.launchpad.net/~didier-barvaux/rohc/1.2.x/revision/151

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.