Skip to content

[mdns] increase TxMessageHistory expire timeout#12129

Closed
abtink wants to merge 1 commit intoopenthread:mainfrom
abtink:mdns/longer-history-expire-timeout
Closed

[mdns] increase TxMessageHistory expire timeout#12129
abtink wants to merge 1 commit intoopenthread:mainfrom
abtink:mdns/longer-history-expire-timeout

Conversation

@abtink
Copy link
Member

@abtink abtink commented Nov 8, 2025

This commit increases TxMessageHistory::kExpireInterval from 10 to 100 seconds.

This interval determines how long information about previously transmitted mDNS messages from the MDNS module is retained. This history is used to detect whether a received message originates from the mDNS module itself.

The increased interval safeguards against potentially longer delays on the platform side when receiving packets.

This commit increases `TxMessageHistory::kExpireInterval` from 10 to
100 seconds.

This interval determines how long information about previously
transmitted mDNS messages from the MDNS module is retained. This
history is used to detect whether a received message originates from
the mDNS module itself.

The increased interval safeguards against potentially longer delays on
the platform side when receiving packets.
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

Merging #12129 into main

name branch text data bss total
ot-cli-ftd a50d1a7 480992 860 66580 548432
217d5d2 480992 860 66580 548432
+/- +0 +0 +0 +0
ot-ncp-ftd a50d1a7 446908 764 61824 509496
217d5d2 446908 764 61824 509496
+/- +0 +0 +0 +0
ot-cli-mtd a50d1a7 373200 764 51052 425016
217d5d2 373200 764 51052 425016
+/- +0 +0 +0 +0
ot-ncp-mtd a50d1a7 354164 764 46320 401248
217d5d2 354164 764 46320 401248
+/- +0 +0 +0 +0
ot-cli-ftd-br a50d1a7 585000 868 136444 722312
217d5d2 585000 868 136444 722312
+/- +0 +0 +0 +0
ot-rcp a50d1a7 63200 568 20804 84572
217d5d2 63200 568 20804 84572
+/- +0 +0 +0 +0
Library files
name branch text data bss total
libopenthread-ftd.a a50d1a7 247921 95 40358 288374
217d5d2 247921 95 40358 288374
+/- +0 +0 +0 +0
libopenthread-cli-ftd.a a50d1a7 61459 0 8083 69542
217d5d2 61459 0 8083 69542
+/- +0 +0 +0 +0
libopenthread-ncp-ftd.a a50d1a7 33581 0 5948 39529
217d5d2 33581 0 5948 39529
+/- +0 +0 +0 +0
libopenthread-mtd.a a50d1a7 166039 0 24854 190893
217d5d2 166039 0 24854 190893
+/- +0 +0 +0 +0
libopenthread-cli-mtd.a a50d1a7 41414 0 8059 49473
217d5d2 41414 0 8059 49473
+/- +0 +0 +0 +0
libopenthread-ncp-mtd.a a50d1a7 25805 0 5948 31753
217d5d2 25805 0 5948 31753
+/- +0 +0 +0 +0
libopenthread-ftd-br.a a50d1a7 354047 100 110190 464337
217d5d2 354047 100 110190 464337
+/- +0 +0 +0 +0
libopenthread-cli-ftd-br.a a50d1a7 79303 0 8115 87418
217d5d2 79303 0 8115 87418
+/- +0 +0 +0 +0
libopenthread-rcp.a a50d1a7 9944 0 5060 15004
217d5d2 9944 0 5060 15004
+/- +0 +0 +0 +0
libopenthread-radio.a a50d1a7 19479 0 238 19717
217d5d2 19479 0 238 19717
+/- +0 +0 +0 +0

@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.37%. Comparing base (a50d1a7) to head (89250a8).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12129      +/-   ##
==========================================
+ Coverage   72.67%   73.37%   +0.70%     
==========================================
  Files         669      669              
  Lines       94045    95235    +1190     
==========================================
+ Hits        68347    69879    +1532     
+ Misses      25698    25356     -342     
Files with missing lines Coverage Δ
src/core/net/mdns.hpp 0.94% <ø> (ø)

... and 322 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@abtink abtink marked this pull request as ready for review November 9, 2025 00:22
@jwhui jwhui requested a review from Copilot November 10, 2025 22:36
@jwhui
Copy link
Member

jwhui commented Nov 10, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request increases the expiration timeout for the mDNS transmitted message history from 10 to 100 seconds. This change is well-justified in the description, as it provides a larger buffer to handle potential platform-side delays in receiving packets, thus preventing the mDNS module from incorrectly treating its own messages as external. The increased timeout enhances the robustness of self-originating message detection. The change is straightforward and looks good.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the TxMessageHistory expiration timeout from 10 to 100 seconds to better handle potential platform delays in packet reception. The transmission history is used to identify self-originating mDNS messages, and the increased timeout provides a wider safety margin against false negatives when platform delays in receiving packets are longer than expected.

  • Increases TxMessageHistory::kExpireInterval constant from 10 to 100 seconds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@abtink
Copy link
Member Author

abtink commented Nov 15, 2025

We can close this.

@abtink abtink closed this Nov 15, 2025
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.

2 participants