Skip to content

Commit

Permalink
only check ID value for destination handler ID check
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Dec 2, 2024
1 parent ce9b558 commit d6e5a25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Fixed

- Correction for `InvalidDestinationId` exception arguments in destination handler.
- Destination handler now only checks entity ID values when checking inserted packets

# [v0.4.0] 2024-11-08

Expand Down
2 changes: 1 addition & 1 deletion src/cfdppy/handler/dest.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def state_machine(self, packet: GenericPduPacket | None = None) -> FsmResult:
def _check_inserted_packet(self, packet: GenericPduPacket) -> None:
if packet.direction != Direction.TOWARDS_RECEIVER:
raise InvalidPduDirection(Direction.TOWARDS_RECEIVER, packet.pdu_header.direction)
if packet.dest_entity_id != self.cfg.local_entity_id:
if packet.dest_entity_id.value != self.cfg.local_entity_id.value:
raise InvalidDestinationId(self.cfg.local_entity_id, packet.dest_entity_id)
if self.remote_cfg_table.get_cfg(packet.source_entity_id) is None:
raise NoRemoteEntityCfgFound(entity_id=packet.dest_entity_id)
Expand Down

0 comments on commit d6e5a25

Please sign in to comment.