Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong max frame packet header size #54

Open
loudblow opened this issue Nov 22, 2023 · 3 comments
Open

Wrong max frame packet header size #54

loudblow opened this issue Nov 22, 2023 · 3 comments
Labels
Bug Something isn't working Minor This issue or PR contains minor changes Unconfirmed This bug/issue has not been confirmed yet

Comments

@loudblow
Copy link

Why is it counted as 20 when the correct size is 23?

pub const RAKNET_HEADER_FRAME_OVERHEAD: u16 = 20 + 8 + 8 + 4 + 20;

1 byte (flags) + 2 bytes (payload length) + 3 bytes (reliable index) + 3 bytes (sequence index) + 3 bytes (order index) + 1 byte (order channel) + 4 bytes (compound size) + 2 bytes (compound id) + 4 bytes (compound index) = 23

@john-bv
Copy link
Member

john-bv commented Nov 27, 2023

interesting observation, i will look into this, it's more than likely something wrong on my side or just type conversion under the hood

@john-bv
Copy link
Member

john-bv commented Jan 26, 2024

I think what i was doing here was allocating space for triads which take 24 bits, which would explain the discrepancy, i will still continue to look into this, as i get time. but I dont think this issue is high priority atm

@john-bv john-bv added Minor This issue or PR contains minor changes Unconfirmed This bug/issue has not been confirmed yet Bug Something isn't working labels Jan 26, 2024
@loudblow
Copy link
Author

loudblow commented Feb 6, 2024

As Dylan (PMMP and RakLib maintainer) said in the same issue of the RakLib - this bug can occur problems only with sequenced packets as it has max header size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Minor This issue or PR contains minor changes Unconfirmed This bug/issue has not been confirmed yet
Projects
None yet
Development

No branches or pull requests

2 participants