]> Sergey Matveev's repositories - stargrave-blog.git/commitdiff
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)
Как только начал возиться с 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;


No differences found