-
Notifications
You must be signed in to change notification settings - Fork 407
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
Why rejecting registration? #1229
Comments
I tested your register payload and I get :
So it fails because you are using This is because we consider that same attribute can not be used twice for same Link.
With #1020 raised, we try to be more strict and respectful of IETF RFC but I believed that we never tolerate this ☝️. (I will double check this later) Anyway is it possible to you to use this notation : |
I just tested with Leshan v1.4.0, the payload And so this is like if |
Can you point out where the spec says you cannot use ct twice? Can you add support for that? |
There is 2 questions here :
About 1), as I said, I don't see any example where attribute is used twice and nothing we let me know it is allowed.
Which seems to let know that if several Content-Format is used the But I agree there is no strong hint that it is not allowed. About 2), we currently used Map indexed by attribute name (e.g. Anyway, that means unfortunately, I would not provide a quick change about this soon. So at short term my advice is to change your device behavior OR use the workaround I provide above ☝️ . |
At first it would seem that In RFC6690 (CoRE Link Format) there are some attributes that can't appear more than once, and they felt the need to explicitly point this out, like here for the
So is there a similar restriction on the Another interesting RFC in this context is RFC5988 (Web Linking), which CoRE Link Format is based on. Some of the attributes in RFC5988 have this sort of text:
This explicitly tells us how to interpret multiple It's interesting that the RFCs got more lax in their language as time went on. RFC5988 has both the "MUST NOT appear" and "MUST be ignored" text. It is followed by RFC6690 that forgets about the "MUST be ignored" part, and that is followed by RFC7252 that also forgets the "MUST NOT appear", at which point nothing is left of the original MUSTs. AFAICT, none of these RFCs say that multiple occurrences should signal a parser error. (The parser I worked with in #1020 does not reject the multiple My opinion is that Leshan should not reject Perhaps the LwM2M spec should be updated to say what the correct behavior is. There's already a "MAY" in there that lets servers get away with parsing |
@weinholt, thx a lot for the detailed answer, that really helps 🙏 I will try to look if there is a not so impacting way to use list instead of map but I guess this will not be the case.
Not really, it seems the previous Leshan version was keeping the last occurence (Note this was not really intended)
I will try to get some hints from OMA : OpenMobileAlliance/OMA_LwM2M_for_Developers#544
You mean the LWM2M spec allow something which is not allowed by the ABNF in RFC6690 ? 😨 |
@Murata-Ruogu how do you deal with this problem for now ? |
We are relying on our vendor to decide what to do. But for now, I am using other servers. Thanks. |
@sbernard31 Yes, there is an exception, but it's only for the Bootstrap-Discover response. I don't think it applies to the registration, and supporting it is not mandatory. From OMA-TS-LightweightM2M_Core-V1_2-20201110-A:
|
This kind of exception does not really help re-usability and LWM2M developers ... 😞 |
I was notified our vendor would do something about it in the client side. So you do not need to make any change for now. Thanks. |
OMA seems to confirm that the right way to go is |
This sounds to confirm that it is OK to not support several ct : core-wg/corrclar#4 |
Our LWM2M client tried to register with payload:
</>;ct=110;ct=112,</1/0>,</2>,</3/0>,</4/0>,</5/0>,</7/0>,</15/0>,</16/0>
But got 4.00 response with reason:
Unable to parse </>;ct=110;ct=112,</1/0>,</2>,</3/0>,</4/0>,</5/0>,</7/0>,</15/0>,</16/0>
We were able to register before. It must be a new version issue. Is it related to #1020?
We do not have space for ct values, thus shouldn't need " around the value 110 or 112. Can you fix this?
The text was updated successfully, but these errors were encountered: