mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-25 23:41:29 +00:00
properly encode >1024 in probe requests (fix #52)
This commit is contained in:
parent
3e07afd13b
commit
751f672a27
|
@ -432,7 +432,7 @@ send_fragsize_probe(int fd, int fragsize)
|
||||||
fragsize &= 2047;
|
fragsize &= 2047;
|
||||||
|
|
||||||
buf[0] = 'r'; /* Probe downstream fragsize packet */
|
buf[0] = 'r'; /* Probe downstream fragsize packet */
|
||||||
buf[1] = b32_5to8((userid << 1) | (fragsize & 1024));
|
buf[1] = b32_5to8((userid << 1) | ((fragsize >> 10) & 1));
|
||||||
buf[2] = b32_5to8((fragsize >> 5) & 31);
|
buf[2] = b32_5to8((fragsize >> 5) & 31);
|
||||||
buf[3] = b32_5to8(fragsize & 31);
|
buf[3] = b32_5to8(fragsize & 31);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue