From e708324c3189cf3ac2f33bfc2d10c61a43a4df6f Mon Sep 17 00:00:00 2001 From: Eduardo Montoya Date: Thu, 9 Dec 2021 18:12:39 +0100 Subject: [PATCH] [mlr] send BMLR.ntf for de-registration (#7227) BBR should send BMLR.ntf to the backbone upon successful de-registration as well. --- src/core/backbone_router/bbr_manager.cpp | 3 +++ tests/scripts/thread-cert/backbone/test_bmlr.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/backbone_router/bbr_manager.cpp b/src/core/backbone_router/bbr_manager.cpp index 4e86a10f8..3372cb00b 100644 --- a/src/core/backbone_router/bbr_manager.cpp +++ b/src/core/backbone_router/bbr_manager.cpp @@ -242,6 +242,9 @@ void Manager::HandleMulticastListenerRegistration(const Coap::Message &aMessage, if (timeout == 0) { mMulticastListenersTable.Remove(address); + + // Put successfully de-registered addresses at the end of `addresses`. + addresses[kIp6AddressesNumMax - (++successAddressNum)] = address; } else { diff --git a/tests/scripts/thread-cert/backbone/test_bmlr.py b/tests/scripts/thread-cert/backbone/test_bmlr.py index 1d2ccce8e..f685da86c 100644 --- a/tests/scripts/thread-cert/backbone/test_bmlr.py +++ b/tests/scripts/thread-cert/backbone/test_bmlr.py @@ -189,11 +189,12 @@ class BBR_5_11_01(thread_cert.TestCase): thread_meshcop.tlv.ipv6_addr == ['{MA5}'] and thread_nm.tlv.timeout == 0 """) - # Verify PBBR not sends `/b/bmr` on the Backbone link for MA5. - pkts.filter_eth_src(PBBR_ETH).filter_coap_request('/b/bmr').filter(f""" + # Verify PBBR sends `/b/bmr` on the Backbone link for MA5 with timeout equal to zero. + pkts.filter_eth_src(PBBR_ETH).filter_coap_request('/b/bmr').must_next().must_verify(f""" thread_meshcop.tlv.ipv6_addr == ['{MA5}'] + and thread_bl.tlv.timeout == 0 and ipv6.src.is_link_local - """).must_not_next() + """) if __name__ == '__main__':