Diff between a76ff5879b755b97043a30682c97788d162bb229 and b72edcc5ca6fd0b3728a37cfa2bfbf483953ebba
Changed Files
| File | Additions | Deletions | Status |
| mesh/model.c | +2 | -1 | modified |
Full Patch
diff --git a/mesh/model.c b/mesh/model.c
index 82078ed..d48e6ef 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -1063,7 +1063,8 @@ int mesh_model_pub_set(struct mesh_node *node, uint16_t addr, uint32_t id,
if (!mod->pub_enabled || (mod->cbs && !(mod->cbs->pub)))
return MESH_STATUS_INVALID_PUB_PARAM;
- if (!appkey_have_key(node_get_net(node), idx))
+ if (!appkey_have_key(node_get_net(node), idx) ||
+ !has_binding(mod->bindings, idx))
return MESH_STATUS_INVALID_APPKEY;
/*