jhedberg commented on a change in pull request #583: Mesh fixes and improvements URL: https://github.com/apache/mynewt-core/pull/583#discussion_r141644362
########## File path: net/nimble/host/mesh/src/cfg.c ########## @@ -2551,14 +2551,22 @@ static void lpn_timeout_get(struct bt_mesh_model *model, BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x lpn_addr 0x%02x", ctx->net_idx, ctx->app_idx, ctx->addr, lpn_addr); + /* check if it's the address of the Low Power Node? */ + if (!BT_MESH_ADDR_IS_UNICAST(lpn_addr)) { + BT_WARN("invalid LPNAddress; ignoring msg"); + goto done; + } Review comment: Friend support is far from complete, which is why this was never implemented. Once the support is in place then we should be doing an actual LPN lookup here. Checking first against non-unicast is probably still fine since it means we don't try an unnecessary lookup, and as the commit message states helps pass one more CFG test case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services