Fix DSCP tagging for dual-stack sockets on Linux
This commit is contained in:
parent
b7a3985807
commit
be6f856840
1 changed files with 4 additions and 1 deletions
|
|
@ -628,7 +628,10 @@ namespace platf {
|
|||
if (dscp_tagging) {
|
||||
int level;
|
||||
int option;
|
||||
if (address.is_v6()) {
|
||||
|
||||
// With dual-stack sockets, Linux uses IPV6_TCLASS for IPv6 traffic
|
||||
// and IP_TOS for IPv4 traffic.
|
||||
if (address.is_v6() && !address.to_v6().is_v4_mapped()) {
|
||||
level = SOL_IPV6;
|
||||
option = IPV6_TCLASS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue