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

Add received message size check #532

Merged
merged 1 commit into from Feb 4, 2021
Merged

Conversation

qleisan
Copy link

@qleisan qleisan commented Feb 3, 2021

Received packets >= MAX_PACKET_SIZE are dropped. MAX_PACKET_SIZE increased to 2048

Signed-off-by: Leif Sandstrom leif.sandstrom@husqvarnagroup.com

Resolves #509

{
fprintf(stderr, "Received packet >= MAX_PACKET_SIZE\r\n");
}
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 length packets are no longer excluded from processing. Did you check that they are handled correctly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was not intended will push an update

{
fprintf(stderr, "Received packet >= MAX_PACKET_SIZE\r\n");
}
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 length packets are now processed. Are they handled correctly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was not intended will push an update

@qleisan
Copy link
Author

qleisan commented Feb 3, 2021

Legacy server implementation processes packets of length 0 (as opposed to clients) @sbertin-telular - do you know why?

Received packets >= MAX_PACKET_SIZE are dropped. MAX_PACKET_SIZE increased to 2048

Signed-off-by: Leif Sandstrom <leif.sandstrom@husqvarnagroup.com>
@sbertin-telular
Copy link
Contributor

I don't know why length 0 is processed by the server and not the client. I've never looked at it. I just noticed it when reviewing your changes. A 0 length packet could be sent as a form of keep-alive, but I think the example programs should just ignore it.

@sbernard31 sbernard31 merged commit 4412049 into eclipse-wakaama:master Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If DATA is more than 1003 bytes only 1003 bytes are sent without any error message.
3 participants