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

CoAP Observe implementation in Zephyr is incompatible with uOSCORE #41

Open
StefanHri opened this issue Mar 20, 2023 · 1 comment
Open

Comments

@StefanHri
Copy link
Contributor

Issue received per email:

As I see my problems with Observe in Zephyr stems from the following lines in Zephyr coap.c and the fact “inner observe” with OSCORE is zero:
(At least the notifications sent are rejected due to below “age check”)

        age = coap_get_option_int(response, COAP_OPTION_OBSERVE);

        /* handle observed requests only if received in order */

        if (age == -ENOENT || is_newer(r->age, age)) {

            r->age = age;

            r->reply(response, r, from);

        }

I think a work around may be to add an external/outer OSCORE observe value that would pass above check?

@StefanHri
Copy link
Contributor Author

The problem originates most likely in:

" A client MUST consider the notification with the highest Partial IV
as the freshest, regardless of the order of arrival. In order to
support existing Observe implementations, the OSCORE client
implementation MAY set the Observe option value to the three least
significant bytes of the Partial IV. Implementations need to make
sure that the notification without Partial IV is considered the
oldest."

See 4.1.3.5.2 in rfc8613.

StefanHri added a commit that referenced this issue Mar 20, 2023
StefanHri added a commit that referenced this issue Mar 26, 2023
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

No branches or pull requests

1 participant