Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_output.c
Show First 20 Lines • Show All 650 Lines • ▼ Show 20 Lines | again: | ||||
/* | /* | ||||
* If specified, try to fill in the traffic class field. | * If specified, try to fill in the traffic class field. | ||||
* Do not override if a non-zero value is already set. | * Do not override if a non-zero value is already set. | ||||
* We check the diffserv field and the ECN field separately. | * We check the diffserv field and the ECN field separately. | ||||
*/ | */ | ||||
if (opt && opt->ip6po_tclass >= 0) { | if (opt && opt->ip6po_tclass >= 0) { | ||||
int mask = 0; | int mask = 0; | ||||
if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0) | if (IPV6_DSCP(ip6) == 0) | ||||
mask |= 0xfc; | mask |= 0xfc; | ||||
if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0) | if (IPv6_ECN(ip6) == ) | ||||
rscheff: typo? | |||||
kpAuthorUnsubmitted Done Inline ActionsWhoops. Good catch. I really should have caught that myself. kp: Whoops. Good catch. I really should have caught that myself. | |||||
mask |= 0x03; | mask |= 0x03; | ||||
if (mask != 0) | if (mask != 0) | ||||
ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); | ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); | ||||
} | } | ||||
/* Fill in or override the hop limit field, if necessary. */ | /* Fill in or override the hop limit field, if necessary. */ | ||||
if (opt && opt->ip6po_hlim != -1) | if (opt && opt->ip6po_hlim != -1) | ||||
ip6->ip6_hlim = opt->ip6po_hlim & 0xff; | ip6->ip6_hlim = opt->ip6po_hlim & 0xff; | ||||
▲ Show 20 Lines • Show All 2,707 Lines • Show Last 20 Lines |
typo?