-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Behavior with malformed packets #2325
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
Comments
I'm not quite clear what is happening from your description I'm afraid. If the client sends a malformed |
From the capture I'm receiving the malformed packet on the server and no activity from the broker, just an acknowledgement of the tcp packet sent. The broker just does nothing and leaves the connection opened, then the client receives no response and closes the connection. From what I can see in the code a disconnect is issued only if the protocol il version 5, is this the expect behavior from the broker as specified from the protocol? |
I successfully reproduced the problem: It is obviously a bug in the client to send a reserved command, but the reserved command should be rejected by the broker before waiting for a remaining length to be transmitted. |
Thank you, this is now fixed for 2.0.21. |
Signed-off-by: Christoph Krey <[email protected]>
Yeah, thank you, it was a 3rd party issue with their code and we ended up telling them to fix it. Thank you for fixing the potential problem on your part too! |
…ength eclipse-mosquitto#2325 Signed-off-by: Christoph Krey <[email protected]>
…ength #2325 Signed-off-by: Christoph Krey <[email protected]>
Hello, I was facing reconnection issues with some clients.
After analyzing the TCP traffic with
tcpdump
I've noticed that a client sent/or I received a malformedPINGREQ
packet, it was supposed to be0xc0
followed by0x00
instead I'm getting0x0a
followed by0xc0
.Right now the client doesn't get a response from it's (broken)
PINGREQ
and resets itself as per specification.Is this the expected broker behavior in this case?
I think the packet it's ignored (no log mentions), should the client be disconnected or notified?
EDIT:
I'm using version 2.0.12 from snap
I looked a bit at the code and in
src/read_handle.c
this case should fall into the default case branch, being a 3.1.x spec client, no action is performed.Is this correct? Should the client be disconnected?
The text was updated successfully, but these errors were encountered: