Skip to content

Commit 1584759

Browse files
kjbraceydeepakvenugopal
authored andcommitted
Extra Thread-specific address check handling
Normal scope rules aren't sufficient for the Thread mesh-local address. Add special handling.
1 parent 934687b commit 1584759

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/Core/address.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,12 @@ int8_t addr_interface_address_compare(protocol_interface_info_entry_t *cur, cons
13601360
if (other != cur &&
13611361
other->zone_index[scope] == cur->zone_index[scope] &&
13621362
addr_is_assigned_to_interface(other, addr)) {
1363+
// special handling for Thread - external global-scope ULA coming in,
1364+
// which would match, but we need to restrict if that ULA is mesh-local
1365+
// on the Thread side.
1366+
if (thread_info(other) && addr_ipv6_scope(addr, other) <= IPV6_SCOPE_REALM_LOCAL) {
1367+
continue;
1368+
}
13631369
return 0;
13641370
}
13651371
}

0 commit comments

Comments
 (0)