Skip to content
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

Fixes a standards compliance issue with the alias conflict handler. #793

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

balazsracz
Copy link
Collaborator

The standard requires that at the time when an alias conflict is detected, the device to issue an AMR frame with the conflicted alias.

This PR adds the missing AMR frame. Adjusts tests to heck for this frame. Fixes a bug in the Global AME handler that was unexpectedly emitting AMD frames for removed aliases, because the cache entry was not correctly wiped when the remove was processed, and the iteration also picked up such deleted entries.

The standard requires that at the time when an alias conflict is detected,
the device to issue an AMR frame with the conflicted alias.

This PR adds the missing AMR frame. Adjusts tests to heck for this frame.
Fixes a bug in the Global AME handler that was unexpectedly emitting AMD
frames for removed aliases, because the cache entry was not correctly wiped
when the remove was processed, and the iteration also picked up such deleted
entries.
@@ -170,6 +175,37 @@ class AliasConflictHandler : public CanFrameStateFlow
return exit();
}

/// Sends an AMR (alias mapping release) frame with the alias alias_ and
/// the loca node ID that we have for it. Then deletes the mapping from the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loca -> local

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Collaborator

@bobjacobsen bobjacobsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard requires that at the time when an alias conflict is detected, the device to issue an AMR frame with the conflicted alias.

This PR adds the missing AMR frame.

The standard says to send the AMR if the alias is for a node in Permitted state. As I read it, if that alias hasn't been used yet to go to Permitted state, it's not really "in use" and you just drop it.

Does this PR do that?

* master:
  Bug fixes in DataBuffer (#791)
  Fixes race conditions in HubDeviceSelect. (#795)
  Fixes missing translation of enums when reading the security mode from a simplelink profile. (#796)
  Fixes flaky IfCanStress.test. (#794)
@balazsracz
Copy link
Collaborator Author

The standard requires that at the time when an alias conflict is detected, the device to issue an AMR frame with the conflicted alias.
This PR adds the missing AMR frame.

The standard says to send the AMR if the alias is for a node in Permitted state. As I read it, if that alias hasn't been used yet to go to Permitted state, it's not really "in use" and you just drop it.

Does this PR do that?

There was indeed a bug there. Thanks for flagging!
I added a unittest to verify this property.

@balazsracz balazsracz merged commit 4ef35ba into master Aug 21, 2024
4 checks passed
@balazsracz balazsracz deleted the bracz-amr-standard-compliance branch August 21, 2024 07:11
atanisoft added a commit to atanisoft/OpenMRNIDF that referenced this pull request Aug 21, 2024
balazsracz added a commit that referenced this pull request Aug 22, 2024
* master:
  Fixes a standards compliance issue with the alias conflict handler. (#793)
  Bug fixes in DataBuffer (#791)
  Fixes race conditions in HubDeviceSelect. (#795)
  Fixes missing translation of enums when reading the security mode from a simplelink profile. (#796)
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.

3 participants