From e9ee868da4e56d87a05070e49fb1f977ecfb2454 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 31 Oct 2020 17:08:29 -0500 Subject: [PATCH] Don't enable QoS for IPv6/NAT64 either --- src/SdpGenerator.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/SdpGenerator.c b/src/SdpGenerator.c index 8e551c2..074f823 100644 --- a/src/SdpGenerator.c +++ b/src/SdpGenerator.c @@ -246,13 +246,16 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) { 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 - // alone), enable QoS tagging for our traffic. Windows qWave will disable it if the host is - // off-link, *however* Windows may get it wrong in cases where the host is directly connected - // to the Internet without a NAT. In this case, it may send DSCP marked traffic off-link and - // it could lead to black holes due to misconfigured ISP hardware or CPE. For this reason, - // we only enable it in cases where it looks like it will work. - if (StreamConfig.streamingRemotely == STREAM_CFG_LOCAL || RemoteAddr.ss_family == AF_INET6) { + // If the remote host is local (RFC 1918), enable QoS tagging for our traffic. Windows qWave + // will disable it if the host is off-link, *however* Windows may get it wrong in cases where + // the host is directly connected to the Internet without a NAT. In this case, it may send DSCP + // marked traffic off-link and it could lead to black holes due to misconfigured ISP hardware + // or CPE. For this reason, we only enable it in cases where it looks like it will work. + // + // 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-aqos.qosTrafficType", "4"); }