Closed lorandt1 closed 7 months ago
Should be fixed.
Thanks again! May I ask when is planned a new libnetconf2 release ?
As soon as the current version becomes a bit more stable, there are still changes being made (mostly in sysrepo). A couple of weeks at most, I hope.
1.patch After I took the changes from devel branch (1.patch contains the differences between the initial fix I received and the one from devel branch added via commit b25c56f) I faced a crash that occurs after a rpc-error for following rpc requst:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<filter type="xpath" xmlns:yanglib="urn:ietf:params:xml:ns:yang:ietf-yang-library" select="/yanglib:*"/>
</get>
</rpc>
I have tested on the current devel
, CLI output:
> get --filter-xpath=/yanglib:*
ly ERROR: Failed to resolve prefix "yanglib".
ERROR
type: application
tag: operation-failed
severity: error
message: Storing value failed.
and the server errors, which are better:
[ERR]: LY: Unexpected XPath expression end. (path "/ietf-netconf:get/filter/@ietf-netconf:select")
[ERR]: LY: Storing value failed. (path "/ietf-netconf:get/filter/@ietf-netconf:select")
so I cannot reproduce this.
The crash didn't appear for me either using the current devel.
RPC-exchange.txt Using
libnetconf2 3.0.8 and libyang 2.1.148:
receive rpc-reply for msg id 41 -> 2024-03-26T15:30:23.706Z Err: [127.0.0.1] Session 1: Received an invalid message (Node "next-update-at" not found as a child of "edit-config" node.).
Based on I think it is certainly normal to happen
Old libnetconf2 2.0.24 and libyang 2.0.112 could handle this case and reply with:
ERR(session, "Received a with an unexpected message-id %" PRIu64 " (expected %" PRIu64 ").",
cur_msgid, msgid);
return NC_MSG_REPLY_ERR_MSGID;
Then the client could still receive the reply of rpc with message id 41
RPC exchanges attached in RPC-exchange.txt. Thank you!