-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Hi,
I would like to bring your attention a violation between the protocol implementation and the specification regarding the MODBUS/TCP Unit Identifier requirement written in the Modbus Application Protocol Specification:
Requirements in the specification:
For Modbus TCP, the value of Unit Identifier must be defined as 0xFF or 0x00.
How does libmodbus violate this requirement?
Libmodbus lacks validation for the Unit identifier value, accepting request with invalid Unit Identifier value.
- Terminal-1(server):
./tests/bandwidth-server-many-up - Terminal-2(client): send the request with invalid Unit Identifier value,
send b'\x00\x01\x00\x00\x00\x06\x0a\x0f\x00\x00\x00\x01\x01\x01'. - Server behaviour: Regardless of the value of the Unit Identifier, the server will ignore the check and treat it as valid,
recv b'\x00\x01\x00\x00\x00\x06\x0a\x0f\x00\x00\x00\x01'.
Metadata
Metadata
Assignees
Labels
No labels