Comment 10 for bug 761955

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

1.)
In c_generic.c line 4909.
I think the "else if" in the middle

                         /* part 2: 5 bits of IP-ID */
                          if(nr_ip_id_bits <= 5)
                                  *f_byte |= g_context->ip_flags.info.v4.id_delta & 0x1f;
                          else if(nr_ts_bits <= 13)
  => *f_byte |= (g_context->ip_flags.info.v4.id_delta >> 8) & 0x1f;
                          else
                                  *f_byte |= 0;

should be removed. If I'm in extension 3 and nr_ip_id_bits are >5, I must put the whole
IP-ID into extension-3 and the 5 bits here are left blank.
I'm unsure this is a new bug, therefore I added it here.

2.)
From my point of view here the (possible) handling of ipid2 is completely missed.
See rfc3095 page 75:

   IP-ID: A compressed IP-ID field.

      IP-ID fields in compressed base headers carry the compressed IP-ID
      of the innermost IPv4 header whose corresponding RND flag is not
      1. The rules below assume that the IP-ID is for the innermost IP
      header. If it is for an outer IP header, the RND2 and NBO2 flags
      are used instead of RND and NBO.

Here it is also possible to use ip-id 2, if ip-id is random or a ipv6 header
was there.