net: lwm2m: Don't allow operations on security object
In spec: The LwM2M Client MUST reject any LwM2M Server operation on the Security Object (ID: 0) with an "4.01 Unauthorized" response code. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This commit is contained in:
parent
d8d81a8075
commit
b0303f5bd3
1 changed files with 5 additions and 0 deletions
|
@ -2330,6 +2330,11 @@ int handle_request(struct coap_packet *request, struct lwm2m_message *msg)
|
|||
goto error;
|
||||
}
|
||||
#endif
|
||||
if (msg->path.obj_id == LWM2M_OBJECT_SECURITY_ID && !msg->ctx->bootstrap_mode) {
|
||||
r = -EACCES;
|
||||
goto error;
|
||||
}
|
||||
|
||||
switch (msg->operation) {
|
||||
|
||||
case LWM2M_OP_READ:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue