Hello everybody,

As a comment says in include/linux/ipv6.h, the ipv6hdr structure is not
correct. The variables priority and flow_lbl do not match the IPv6
header fields as described in the RFC.

/*
 * IPv6 fixed header
 *
 * BEWARE, it is incorrect. The first 4 bits of flow_lbl
 * are glued to priority now, forming "class".
 */

struct ipv6hdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)
   __u8        priority:4,
            version:4;
#elif defined(__BIG_ENDIAN_BITFIELD)
   __u8        version:4,
            priority:4;
#else
#error   "Please fix <asm/byteorder.h>"
#endif
   __u8        flow_lbl[3];

[snip]


Is there some specific reason (other than historical one) ?

Didier Barvaux

Attachment: signature.asc
Description: PGP signature

Reply via email to