mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Don't enable QoS for IPv6/NAT64 either
This commit is contained in:
parent
dbf81dcb63
commit
e9ee868da4
@ -246,13 +246,16 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
|||||||
|
|
||||||
err |= addAttributeString(&optionHead, "x-nv-vqos[0].videoQualityScoreUpdateTime", "5000");
|
err |= addAttributeString(&optionHead, "x-nv-vqos[0].videoQualityScoreUpdateTime", "5000");
|
||||||
|
|
||||||
// If the remote host is local (RFC 1918) or IPv6 (where it's hard to tell based on the address
|
// If the remote host is local (RFC 1918), enable QoS tagging for our traffic. Windows qWave
|
||||||
// alone), enable QoS tagging for our traffic. Windows qWave will disable it if the host is
|
// will disable it if the host is off-link, *however* Windows may get it wrong in cases where
|
||||||
// off-link, *however* Windows may get it wrong in cases where the host is directly connected
|
// the host is directly connected to the Internet without a NAT. In this case, it may send DSCP
|
||||||
// to the Internet without a NAT. In this case, it may send DSCP marked traffic off-link and
|
// marked traffic off-link and it could lead to black holes due to misconfigured ISP hardware
|
||||||
// it could lead to black holes due to misconfigured ISP hardware or CPE. For this reason,
|
// or CPE. For this reason, we only enable it in cases where it looks like it will work.
|
||||||
// we only enable it in cases where it looks like it will work.
|
//
|
||||||
if (StreamConfig.streamingRemotely == STREAM_CFG_LOCAL || RemoteAddr.ss_family == AF_INET6) {
|
// Even though IPv6 hardware should be much less likely to have this issue, we can't tell
|
||||||
|
// if our address is a NAT64 synthesized IPv6 address or true end-to-end IPv6. If it's the
|
||||||
|
// former, it may have the same problem as other IPv4 traffic.
|
||||||
|
if (StreamConfig.streamingRemotely == STREAM_CFG_LOCAL) {
|
||||||
err |= addAttributeString(&optionHead, "x-nv-vqos[0].qosTrafficType", "5");
|
err |= addAttributeString(&optionHead, "x-nv-vqos[0].qosTrafficType", "5");
|
||||||
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "4");
|
err |= addAttributeString(&optionHead, "x-nv-aqos.qosTrafficType", "4");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user