@@ -1746,6 +1746,7 @@ bool thread_addresses_needs_to_be_registered(protocol_interface_info_entry_t *cu
1746
1746
{
1747
1747
lowpan_context_t * ctx ;
1748
1748
uint8_t thread_realm_local_mcast_addr [16 ];
1749
+ uint8_t thread_ll_unicast_prefix_based_mcast_addr [16 ];
1749
1750
if (thread_info (cur )-> thread_device_mode != THREAD_DEVICE_MODE_SLEEPY_END_DEVICE &&
1750
1751
thread_info (cur )-> thread_device_mode != THREAD_DEVICE_MODE_END_DEVICE ) {
1751
1752
// No address registration for others than MED or SED
@@ -1768,18 +1769,22 @@ bool thread_addresses_needs_to_be_registered(protocol_interface_info_entry_t *cu
1768
1769
}
1769
1770
1770
1771
// check for multicast groups
1771
- thread_bootstrap_all_nodes_address_generate (thread_realm_local_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , 3 );
1772
+ thread_bootstrap_all_nodes_address_generate (thread_realm_local_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , IPV6_SCOPE_REALM_LOCAL );
1773
+ thread_bootstrap_all_nodes_address_generate (thread_ll_unicast_prefix_based_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , IPV6_SCOPE_LINK_LOCAL );
1772
1774
ns_list_foreach (if_group_entry_t , entry , & cur -> ip_groups )
1773
1775
{
1774
- if (addr_ipv6_multicast_scope ( entry -> group ) < IPV6_SCOPE_REALM_LOCAL ) {
1775
- /* Skip Link Local multicast address */
1776
+ if (! memcmp (( entry -> group ), ADDR_MULTICAST_SOLICITED , 13 ) ) {
1777
+ /* Skip solicited node multicast address */
1776
1778
continue ;
1777
1779
}
1778
-
1779
1780
if (addr_ipv6_equal (entry -> group , thread_realm_local_mcast_addr )) {
1780
1781
/* Skip well-known realm-local all Thread nodes multicast address */
1781
1782
continue ;
1782
1783
}
1784
+ if (addr_ipv6_equal (entry -> group , thread_ll_unicast_prefix_based_mcast_addr )) {
1785
+ /* Skip well-known link-local all Thread nodes multicast address */
1786
+ continue ;
1787
+ }
1783
1788
if (addr_ipv6_equal (entry -> group , ADDR_ALL_MPL_FORWARDERS )) {
1784
1789
/* Skip All MPL Forwarders address */
1785
1790
continue ;
@@ -1835,6 +1840,7 @@ uint8_t *thread_ml_address_tlv_write(uint8_t *ptr, protocol_interface_info_entry
1835
1840
uint8_t * thread_address_registration_tlv_write (uint8_t * ptr , protocol_interface_info_entry_t * cur )
1836
1841
{
1837
1842
uint8_t thread_realm_local_mcast_addr [16 ];
1843
+ uint8_t thread_ll_unicast_prefix_based_mcast_addr [16 ];
1838
1844
lowpan_context_t * ctx ;
1839
1845
uint8_t * address_len_ptr ;
1840
1846
@@ -1850,7 +1856,6 @@ uint8_t *thread_address_registration_tlv_write(uint8_t *ptr, protocol_interface_
1850
1856
1851
1857
// Register all global addressess
1852
1858
ns_list_foreach (if_address_entry_t , e , & cur -> ip_addresses ) {
1853
-
1854
1859
if (* address_len_ptr > 148 ) {
1855
1860
// Maximum length of address registrations
1856
1861
continue ;
@@ -1874,23 +1879,27 @@ uint8_t *thread_address_registration_tlv_write(uint8_t *ptr, protocol_interface_
1874
1879
}
1875
1880
1876
1881
/* Registers multicast addresses to the parent */
1877
- thread_bootstrap_all_nodes_address_generate (thread_realm_local_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , 3 );
1878
-
1882
+ thread_bootstrap_all_nodes_address_generate (thread_realm_local_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , IPV6_SCOPE_REALM_LOCAL );
1883
+ thread_bootstrap_all_nodes_address_generate ( thread_ll_unicast_prefix_based_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo . ulaPrefix , IPV6_SCOPE_LINK_LOCAL );
1879
1884
ns_list_foreach (if_group_entry_t , entry , & cur -> ip_groups )
1880
1885
{
1881
1886
if (* address_len_ptr > 148 ) {
1882
1887
// Maximum length of address registrations
1883
1888
continue ;
1884
1889
}
1885
- if (addr_ipv6_multicast_scope (entry -> group ) < IPV6_SCOPE_REALM_LOCAL ) {
1886
- /* Skip Link Local multicast address */
1890
+
1891
+ if (!memcmp ((entry -> group ), ADDR_MULTICAST_SOLICITED , 13 )) {
1892
+ /* Skip solicited node multicast address */
1887
1893
continue ;
1888
1894
}
1889
-
1890
1895
if (addr_ipv6_equal (entry -> group , thread_realm_local_mcast_addr )) {
1891
1896
/* Skip well-known realm-local all Thread nodes multicast address */
1892
1897
continue ;
1893
1898
}
1899
+ if (addr_ipv6_equal (entry -> group , thread_ll_unicast_prefix_based_mcast_addr )) {
1900
+ /* Skip well-known link-local all Thread nodes multicast address */
1901
+ continue ;
1902
+ }
1894
1903
if (addr_ipv6_equal (entry -> group , ADDR_ALL_MPL_FORWARDERS )) {
1895
1904
/* Skip All MPL Forwarders address */
1896
1905
continue ;
@@ -2058,7 +2067,7 @@ void thread_mcast_group_change(struct protocol_interface_info_entry *interface,
2058
2067
2059
2068
if (thread_bootstrap_should_register_address (interface )) {
2060
2069
/* Trigger Child Update Request only if MTD child's multicast address change */
2061
- if (addr_ipv6_multicast_scope (group -> group ) > IPV6_SCOPE_LINK_LOCAL ) {
2070
+ if (addr_ipv6_multicast_scope (group -> group ) >= IPV6_SCOPE_LINK_LOCAL ) {
2062
2071
interface -> thread_info -> childUpdateReqTimer = 1 ;
2063
2072
}
2064
2073
} else {
0 commit comments