On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote:
> + while (oplen_tmp >= 8) {
> + u32 right_b = get_unaligned_be32(sack_tmp + 4);
> + u32 left_b = get_unaligned_be32(sack_tmp);
> +
> + if (left_b >= right_b)
> + continue;
> +
> + if (first)
> + bytes_b += right_b - left_b;
> +
> + if (left_b <= left_a && right_a <= right_b) {
> + found = true;
> + if (!first)
> + break;
> + }
> + oplen_tmp -= 8;
> + sack_tmp += 8;
> + }
>
This is obviously incorrect.
Please take a look at TCP stack, and how it handles sequence wrapping with
following macros :
after(), before()
Quite frankly O wonder how this was really tested.
_______________________________________________
Cake mailing list
[email protected]
https://lists.bufferbloat.net/listinfo/cake