You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ecn::build writes the bare ECN bits as the IP_TOS / IPV6_TCLASS control
message. The kernel uses that value as the whole traffic-class byte for the
datagram (ip_cmsg_send: ipc->tos = val), which overrides whatever DSCP the
socket was given with setsockopt(IP_TOS).
Repro: sender with setsockopt(IP_TOS, 0xb8) (EF), control ecn = ect0. The raw
TOS on the wire is 0x02, not 0xba.
Proposed fix
Pick one:
Carry DSCP alongside ECN in the transmit control, for example a traffic_class
feature whose value holds both fields, with ecn as a convenience on top.
Let a socket option record the DSCP at open time, and have ecn::build OR it
in. This needs somewhere to keep it, which the stateless feature design does
not have today.
At minimum, document on ecn and in docs/metadata.md that sending with it
resets DSCP to zero.
Acceptance
A test that sets DSCP and sends with ECN observes both on the wire.
Activity