Commit 488cbb1
committed
[dnssd] deduplicate service instance updates
When OTBR_MDNS=mDNSResponder is enabled, redundant service browse and
resolve callbacks can occur for already discovered TREL peers. Because
TrelDnssd::OnTrelServiceInstanceAdded unconditionally called
OnTrelServiceInstanceRemoved right at the start of the function, each
duplicate mDNS update triggered peer removal (kDnssdRemoved) followed
by peer re-addition (kReAdded).
This continuous state cycling in OpenThread's TrelPeerTable caused
unnecessary multi-radio link probing and out-of-order fragment delivery
between 15.4 and TREL interfaces, leading to kErrorDuplicated drops on
valid ICMPv6 Echo Reply fragments during integration tests.
Before calling OnTrelServiceInstanceRemoved, check if the peer entry
already exists with identical socket address and TXT data. If unchanged,
update mDiscoverTime and exit without triggering peer removal or
re-addition in OpenThread.1 parent 9aa79a0 commit 488cbb1
2 files changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
| |||
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
334 | 352 | | |
335 | 353 | | |
336 | 354 | | |
| |||
387 | 405 | | |
388 | 406 | | |
389 | 407 | | |
| 408 | + | |
| 409 | + | |
390 | 410 | | |
391 | 411 | | |
392 | 412 | | |
| |||
466 | 486 | | |
467 | 487 | | |
468 | 488 | | |
469 | | - | |
| 489 | + | |
| 490 | + | |
470 | 491 | | |
471 | 492 | | |
472 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| |||
0 commit comments