You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the client receive a BootstrapDeleteRequest, it leads to clear all its objects instances whatever the 'path' value of the request is. Indeed in the following code, the 'objects' field contains all objects declared in the client :
A filter matching the objects and the BootstrapDeleteRequest path is missing.
(the BootstrapDeleteRequest path must still match one of the client object, else the request will be rejected beforehand in ServerMessageDeliverer due to the findResource check).
I think the key point is that previously in M10, the instance/request filtering was made at ObjectResource level where it used a dedicated nodeEnabler (restricted to the targeted objectId) instead of the generic DownlinkRequestReceiver which will trigger the call to BootstrapHandler.delete and iterates on all the client's objects.
How to reproduce
Setup a leshan bootstrap server.
Setup a leshan-client in bootstrap mode, with several objects in its model.
Setup a Bootstrap sequence for this client with a BootstrapConfig having 'toDelete' with just '/0'.
All objects instances of the client are in fact cleared instead of just '/0' ones.
Relevant Output
No response
The text was updated successfully, but these errors were encountered:
Version(s)
9859a33
Which components
leshan client
Tested With
No response
What happened
When the client receive a BootstrapDeleteRequest, it leads to clear all its objects instances whatever the 'path' value of the request is. Indeed in the following code, the 'objects' field contains all objects declared in the client :
https://github.com/eclipse/leshan/blob/122a1a8556f659f2a9b43ef81d4250672bc72e22/leshan-client-core/src/main/java/org/eclipse/leshan/client/bootstrap/BootstrapHandler.java#L95-L97
A filter matching the objects and the BootstrapDeleteRequest path is missing.
(the BootstrapDeleteRequest path must still match one of the client object, else the request will be rejected beforehand in ServerMessageDeliverer due to the findResource check).
I think the key point is that previously in M10, the instance/request filtering was made at ObjectResource level where it used a dedicated nodeEnabler (restricted to the targeted objectId) instead of the generic DownlinkRequestReceiver which will trigger the call to BootstrapHandler.delete and iterates on all the client's objects.
How to reproduce
Setup a leshan bootstrap server.
Setup a leshan-client in bootstrap mode, with several objects in its model.
Setup a Bootstrap sequence for this client with a BootstrapConfig having 'toDelete' with just '/0'.
All objects instances of the client are in fact cleared instead of just '/0' ones.
Relevant Output
No response
The text was updated successfully, but these errors were encountered: