Skip to content

Fragmented TCP messages are not handled correctly #703

@andersjohnsen

Description

@andersjohnsen

As seen here

https://github.com/riptideio/pymodbus/blob/c5772b35ae3f29d1947f3ab453d8d00df846459f/pymodbus/framer/socket_framer.py#L160

if a modbus TCP packet is split between two or more fragments, the frame will be reset in between and will thus fail parsing. As TCP is a fully streaming protocol that supports splitting and merging data at will, this is leading to unreliable behavior. Simply removing the resetFrame call (and perhaps the log?) appears to fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions