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

[trel] updates for switching trel interface #2579

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

sunytt
Copy link
Contributor

@sunytt sunytt commented Nov 4, 2024

As it's possible to switch network interface for TREL in openthread/openthread#10872, updated trel_dnssd.cpp in 2 places:
1). Initialize() can be called multiple times now, so it should clear the mTrelNetifIndex at the beginning to refresh the index according to the given interface name.
2). HandleMdnsState() may be invoked when TrelDnssd is not initialized, we should still update the mMdnsPublisherReady status, so it's ready to publish a service when TrelDnssd becomes initialized.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.30%. Comparing base (2b41187) to head (81139be).
Report is 855 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2579      +/-   ##
==========================================
- Coverage   55.77%   46.30%   -9.48%     
==========================================
  Files          87      104      +17     
  Lines        6890    12502    +5612     
  Branches        0      908     +908     
==========================================
+ Hits         3843     5789    +1946     
- Misses       3047     6399    +3352     
- Partials        0      314     +314     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sunytt sunytt marked this pull request as ready for review November 4, 2024 07:36
@sunytt sunytt requested a review from superwhd November 4, 2024 07:37
Copy link
Contributor

@superwhd superwhd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

src/trel_dnssd/trel_dnssd.cpp Outdated Show resolved Hide resolved
As it's possible to switch network interface for TREL in
openthread/openthread#10872, updated
trel_dnssd.cpp in 2 places:
1). Initialize() can be called multiple times now, so it should clear the
mTrelNetifIndex at the beginning to refresh the index according to the
given interface name.
2). HandleMdnsState() may be invoked when TrelDnssd is not initialized,
we should still update the mMdnsPublisherReady status, so it's ready to
publish a service when TrelDnssd becomes initialized.
@sunytt sunytt requested a review from abtink November 4, 2024 12:18
@sunytt sunytt requested a review from jwhui November 5, 2024 06:13
@jwhui jwhui merged commit 96c963b into openthread:main Nov 5, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants