Skip to content

fix(server): correct COTP connection confirm framing - #816

Open
gijzelaerr wants to merge 1 commit into
masterfrom
fix/813-cotp-connection-confirm
Open

fix(server): correct COTP connection confirm framing#816
gijzelaerr wants to merge 1 commit into
masterfrom
fix/813-cotp-connection-confirm

Conversation

@gijzelaerr

@gijzelaerr gijzelaerr commented Aug 14, 2026

Copy link
Copy Markdown
Owner

The TPDU-size negotiation added for #804 is correct and remains intact. However, the Connection Confirm also emitted a standalone CDT byte even though class-0 CDT is already encoded in the low nibble of the CC type byte. That shifted every following field and made the frame malformed for strict clients such as Apache PLC4X.

This removes only the extra byte, keeps the negotiated TPDU-size parameter, and adds an exact-frame regression test that also verifies the COTP length indicator.

Local verification:

  • 1,592 tests passed, 94 skipped
  • All pre-commit hooks passed, including mypy and Ruff
  • Source distribution and wheel built successfully

Closes #813

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.

COTP Connection Confirm is off by one

1 participant