Skip to content

Commit 77229ee

Browse files
Mika TervonenMika Tervonen
Mika Tervonen
authored and
Mika Tervonen
committed
Fix CPP error from domain prefix check
Address unspecifed read 16 bytes from the domain prefix which is only 8 bytes
1 parent 7e47889 commit 77229ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/6LoWPAN/Thread/thread_bbr_commercial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ void thread_bbr_commercial_route_update(protocol_interface_info_entry_t *cur)
13511351
// remove with info and add valid domain prefix again to back bone interface
13521352
ipv6_route_table_remove_info(this->backbone_interface_id, ROUTE_THREAD_BBR, NULL);
13531353

1354-
if (!addr_is_ipv6_unspecified(this->domain_prefix)) {
1354+
if (memcmp(this->domain_prefix, ADDR_UNSPECIFIED, 8) != 0) {
13551355
// add dua route to backbone, delete dua from on-mesh route
13561356
ipv6_route_add_with_info(this->domain_prefix, 64, this->backbone_interface_id, NULL, ROUTE_THREAD_BBR, NULL, 0, 0xffffffff, 0);
13571357
tr_info("Hosting pBBR for DUA prefix");

0 commit comments

Comments
 (0)