Skip to content

Conversation

@jeremie6wind
Copy link
Contributor

When an RPC output has a container and the RPC callback returns nothing, the np2srv_rpc_cb does not add the 'ok' empty leaf. The rpc-reply is empty.
The client receives an error when it reads the RPC response with nc_recv_reply, because it expects either 'ok' or 'data'. Look at the content of the reply and add the 'ok' leaf if no child with the default flag is found.

Fixes: 3936132 ("server UPDATE call NC RPC directly, not using sysrepo")
Link: https://datatracker.ietf.org/doc/html/rfc7950#section-7.14.4
Link: https://datatracker.ietf.org/doc/html/rfc6241#section-4.4

When an RPC output has a container and the RPC callback returns nothing,
the np2srv_rpc_cb does not add the 'ok' empty leaf. The rpc-reply is
empty.
The client receives an error when it reads the RPC response with
nc_recv_reply, because it expects either 'ok' or 'data'.
Look at the content of the reply and add the 'ok' leaf if no child with
the default flag is found.

Fixes: 3936132 ("server UPDATE call NC RPC directly, not using sysrepo")
Link: https://datatracker.ietf.org/doc/html/rfc7950#section-7.14.4
Link: https://datatracker.ietf.org/doc/html/rfc6241#section-4.4
@michalvasko michalvasko merged commit 07e72c4 into CESNET:devel Aug 14, 2025
7 checks passed
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