@@ -2060,24 +2060,25 @@ static bool thread_mcast_should_register_address(struct protocol_interface_info_
2060
2060
{
2061
2061
uint8_t thread_realm_local_mcast_addr [16 ];
2062
2062
uint8_t thread_ll_unicast_prefix_based_mcast_addr [16 ];
2063
+ if (addr_ipv6_multicast_scope (addr ) < IPV6_SCOPE_LINK_LOCAL ) {
2064
+ return false;
2065
+ }
2066
+ if (memcmp (addr , ADDR_MULTICAST_SOLICITED , 13 ) == 0 ) {
2067
+ return false;
2068
+ }
2069
+ if (memcmp (addr , ADDR_LINK_LOCAL_ALL_NODES , 16 ) == 0 ) {
2070
+ return false;
2071
+ }
2072
+ if (memcmp (addr , ADDR_LINK_LOCAL_ALL_ROUTERS , 16 ) == 0 ) {
2073
+ return false;
2074
+ }
2063
2075
thread_bootstrap_all_nodes_address_generate (thread_realm_local_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , IPV6_SCOPE_REALM_LOCAL );
2076
+ if (memcmp (addr , thread_realm_local_mcast_addr , 16 ) == 0 ) {
2077
+ return false;
2078
+ }
2064
2079
thread_bootstrap_all_nodes_address_generate (thread_ll_unicast_prefix_based_mcast_addr , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , IPV6_SCOPE_LINK_LOCAL );
2065
- if (addr_ipv6_multicast_scope (addr ) >= IPV6_SCOPE_LINK_LOCAL ) {
2066
- if (memcmp (addr , ADDR_MULTICAST_SOLICITED , 13 ) == 0 ) {
2067
- return false;
2068
- }
2069
- if (memcmp (addr , thread_realm_local_mcast_addr , 16 ) == 0 ) {
2070
- return false;
2071
- }
2072
- if (memcmp (addr , thread_ll_unicast_prefix_based_mcast_addr , 16 ) == 0 ) {
2073
- return false;
2074
- }
2075
- if (memcmp (addr , ADDR_LINK_LOCAL_ALL_NODES , 16 ) == 0 ) {
2076
- return false;
2077
- }
2078
- if (memcmp (addr , ADDR_LINK_LOCAL_ALL_ROUTERS , 16 ) == 0 ) {
2079
- return false;
2080
- }
2080
+ if (memcmp (addr , thread_ll_unicast_prefix_based_mcast_addr , 16 ) == 0 ) {
2081
+ return false;
2081
2082
}
2082
2083
return true;
2083
2084
}
0 commit comments