Gerrit Renker 26ced1e4aa inet6: Set default traffic class
This patch addresses:
 * assigning -1 to np->tclass as it is currently done is not very meaningful,
   since it turns into 0xff;
 * RFC 3542, 6.5 allows -1 for clearing the sticky IPV6_TCLASS option
   and specifies -1 to mean "use kernel default":
   - RFC 2460, 7. requires that the default traffic class must be zero for
     all 8 bits,
   - this is consistent with RFC 2474, 4.1 which recommends a default PHB of 0,
     in combination with a value of the ECN field of "non-ECT" (RFC 3168, 5.).

This patch changes the meaning of -1 from assigning 255 to mean the RFC 2460
default, which at the same time allows to satisfy clearing the sticky TCLASS
option as per RFC 3542, 6.5.

(When passing -1 as ancillary data, the fallback remains np->tclass, which
 has either been set via socket options, or contains the default value.)

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:43:32 -07:00
..
2009-05-25 01:53:53 -07:00
2009-08-05 10:42:58 -07:00
2009-08-05 10:42:58 -07:00
2009-08-09 21:45:32 -07:00
2009-05-25 01:53:53 -07:00
2009-08-05 10:42:58 -07:00
2009-08-13 16:43:32 -07:00
2009-07-12 12:22:34 -07:00
2009-08-05 10:42:58 -07:00
2009-08-04 16:44:35 -04:00
2009-07-23 18:01:10 -07:00
2009-08-04 16:44:23 -04:00
2009-08-05 10:42:58 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 14:03:27 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00