]> Sergey Matveev's repositories - stargrave-blog.git/commit
softflowd и IPv6 ToS
authorSergey Matveev <stargrave@stargrave.org>
Sun, 30 Nov 2025 07:03:07 +0000 (10:03 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 30 Nov 2025 07:23:36 +0000 (10:23 +0300)
commite028b3ca649cc2d55c6ef54e3fef1338015c0554
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent04a0287d98039489d3ac2f479c7d4680e4009893
softflowd и IPv6 ToS

Как только начал возиться с DSCP в IP пакетах, то обнаружил, что
softflowd (a7a40dc150b30297888da95c5d95abb4679d6b21) не заполняет
ToS поле в своей отправляемой статистике. Посмотрел код, починил так,
отбрасывая ECN биты:

    -  flow->tos[ndx] = (ntohl (ip6->ip6_flow) & ntohl (0x0ff00000)) >> 20;
    +  flow->tos[ndx] = (ntohl(ip6->ip6_flow) >> 20) & 0xfc;