docs(server): document DSCP-safe listener pairing
This commit is contained in:
3 files changed
+25
-7
No files matched your search
@@ -500,13 +500,14 @@ session policy lives.
|
||||
unmarked reply into a *dropped* one, because an unappliable marking stops the
|
||||
send. Verify a platform before extending that list.
|
||||
- A genuinely dual-stack `[::]` listener still emits **unmarked** IPv4-mapped
|
||||
replies, and this is known. It is not fixed by choosing the option per reply,
|
||||
for the macOS reason above, and it predates wildcard source selection. Leave it
|
||||
until it is worth its own slice, and do not "fix" it by weakening the rule that
|
||||
an unappliable marking stops the send. The crate forbids unsafe code;
|
||||
there is no raw `setsockopt` and no `sendmsg`/`cmsg` machinery. Keep the
|
||||
target lists identical to the pinned `socket2` version's own gates — check
|
||||
its source rather than copying another crate's older matrix.
|
||||
replies on Linux. When reply DSCP/traffic-class marking for IPv4 peers
|
||||
matters, configure the normal same-port `[::]:PORT` plus `0.0.0.0:PORT`
|
||||
listener pair instead; `ServerSet` makes the IPv6 half IPv6-only for that
|
||||
pair. Do not force `IPV6_V6ONLY` on every lone IPv6 listener, and do not
|
||||
weaken the rule that an unappliable marking stops the send. The crate forbids
|
||||
unsafe code; there is no raw `setsockopt` and no `sendmsg`/`cmsg` machinery.
|
||||
Keep the target lists identical to the pinned `socket2` version's own gates
|
||||
— check its source rather than copying another crate's older matrix.
|
||||
|
||||
## Rate, lifetime and server-initiated close
|
||||
|
||||
|
||||
@@ -91,6 +91,14 @@ impl ServerSet {
|
||||
/// An IPv4-mapped address such as `[::ffff:0.0.0.0]` is an IPv4 listener
|
||||
/// here, not an IPv6 one, matching how the runtime already reads it.
|
||||
///
|
||||
/// A lone explicit dual-stack `[::]:PORT` listener is not the recommended
|
||||
/// configuration when reply DSCP/traffic-class marking for IPv4 peers
|
||||
/// matters: Linux serves those peers as IPv4-mapped and cannot retain the
|
||||
/// negotiated marking on their replies. Request the normal same-port
|
||||
/// `[::]:PORT` and `0.0.0.0:PORT` pair instead. This method makes the IPv6
|
||||
/// half IPv6-only for that pair only; a lone IPv6 listener retains its
|
||||
/// normal socket behavior.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns [`ServerSetError::NoListeners`] if `addrs` is empty — a set
|
||||
|
||||
Reference in new issue
Block a user