Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not a reply to DM requests coming from unregistered servers. #24

Merged
merged 3 commits into from
Mar 16, 2015

Conversation

dnav
Copy link
Contributor

@dnav dnav commented Mar 11, 2015

This can serve as a work around for issue OpenMobileAlliance/OMA_LwM2M_for_Developers#7
If a request arrives before the registration ACK, it will be ignored. So the server will resend it per CoAP specifications. Chances are the ACK will arrive before the retransmission.

David Navarro added 3 commits March 11, 2015 17:18
…the server.

Signed-off-by: David Navarro <david.navarro@intel.com>
Signed-off-by: David Navarro <david.navarro@intel.com>
Signed-off-by: David Navarro <david.navarro@intel.com>
@boaks
Copy link

boaks commented Mar 12, 2015

This solution has impacts:

  • LWM2M servers need to know, that 401 UNAUTHORIZED needs to be handled different in the register phase.
    (see also coap 5.9.2.2, 4.01 Unauthorized
    "The client is not authorized to perform the requested action. The
    client SHOULD NOT repeat the request without first improving its
    authentication status to the server.")
  • You may get even more traffic during registration

@dnav
Copy link
Contributor Author

dnav commented Mar 12, 2015

LWM2M servers need to know, that 401 UNAUTHORIZED needs to be handled different in the register phase.

This is the current status. With this change, the LWM2M client does not reply to any request until the registration phase finished. So the server has no special handling to implement.

@boaks
Copy link

boaks commented Mar 12, 2015

"So the server has no special handling to implement."

Scenario:

  • LWM2M client (coap client) registers
  • LWM2M server (coap server) response to the register
  • LWM2M server (coap client) requests a resource
  • LWM2M client (coap server) receives the request for a resource before the response to register (reorder, package loss)
  • LWM2M client (coap server) reponse to the resource request with 4.01
  • LWM2M server (coap client) receives response with 4.01

So, with no special handling on the LWM2M server, the LWM2M server may either get 2.05 or 4.01.
.

@dnav
Copy link
Contributor Author

dnav commented Mar 12, 2015

Yes this is the current behavior of wakaama.
With this change you will now have:

  • LWM2M client (coap client) registers
  • LWM2M server (coap server) response to the register
  • LWM2M server (coap client) requests a resource
  • LWM2M client (coap server) receives the request for a resource before the response to register (reorder, package loss)
  • LWM2M client (coap server) do not reply to the LWM2M server
  • LWM2M client receives the response to the register
  • LWM2M server (coap client) retransmits the request of a resource
  • LWM2M client (coap server) receives the request for a resource
  • LWM2M client (coap server) replies to the resource request with 2.05 and content
  • LWM2M server (coap client) receives response with 2.05 and content

@boaks
Copy link

boaks commented Mar 12, 2015

OK, your right!

I overseen the IGNORE.

(By the way, the "current" behaviour of wakaam was a response with 2.05, because the registration status was only checked for observe-, not for read-requests : - ). )

dnav pushed a commit that referenced this pull request Mar 16, 2015
Do not a reply to DM requests coming from unregistered servers.
@dnav dnav merged commit dd95a3e into master Mar 16, 2015
@dnav dnav deleted the ignore_result branch March 16, 2015 09:18
vslapik pushed a commit to vslapik/wakaama that referenced this pull request Apr 20, 2017
Do not a reply to DM requests coming from unregistered servers.
taubel pushed a commit to punica/wakaama that referenced this pull request Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants