-
Notifications
You must be signed in to change notification settings - Fork 376
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
Conversation
examples/client/lwm2mclient.c
Outdated
{ | ||
fprintf(stderr, "Received packet >= MAX_PACKET_SIZE\r\n"); | ||
} | ||
else |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
examples/lightclient/lightclient.c
Outdated
{ | ||
fprintf(stderr, "Received packet >= MAX_PACKET_SIZE\r\n"); | ||
} | ||
else |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 <[email protected]>
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. |
Received packets >= MAX_PACKET_SIZE are dropped. MAX_PACKET_SIZE increased to 2048
Signed-off-by: Leif Sandstrom [email protected]
Resolves #509