Skip to content

wi-sun stack ws_bootstrap_neighbor_info_get return one more info #15372

Open
@mcuxmx

Description

@mcuxmx

Description of defect

Target(s) affected by this defect ?

N/A

Toolchain(s) (name and version) displaying this defect ?

N/A

What version of Mbed-os are you using (tag or sha) ?

mbed-os-6.16.0

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

N/A

How is this defect reproduced ?

When the input parameter table_max of the function ws_bootstrap_neighbor_info_get is smaller than the number of neighbor tables (mac_neighbor_info(cur)->list_total_size), the function will return one more neighbor information.
For example: when table_max=16, the current number of neighbors is 20 mac_neighbor_info(cur)->list_total_size=20, the function will return 17 neighbor information.

for (int n = 0; n < mac_neighbor_info(cur)->list_total_size; n++) {
if (count > table_max) {
break;
}

The expression “count > table_max” probably should be “count >= table_max”

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions