Skip to content

Commit

Permalink
* Netconf: Disabled default announcing of Netconf 1.1, instead only a…
Browse files Browse the repository at this point in the history
…nnounce 1.0

  * See [Clixon does not switch to chunked framing after NETCONF 1.1 is negotiated](#314)
  * To enable Netconf 1.1, set `NETCONF_1_1_ANNOUNCE`
  • Loading branch information
olofhagsand committed Mar 17, 2022
1 parent 23b466a commit 85c6c11
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Expected: May 2022

Users may have to change how they access the system

* Netconf: Disabled default announcing of Netconf 1.1, instead only announce 1.0
* See [Clixon does not switch to chunked framing after NETCONF 1.1 is negotiated](https://github.com/clicon/clixon/issues/314)
* To enable Netconf 1.1, set `NETCONF_1_1_ANNOUNCE`
* Netconf data-not-unique info changed to return schema nodes instead of XML for RFC7950 compliance
* CLI reconnects to backend if backend restarts with a warning
* Note that edits to the candidate database or locks will be lost
Expand Down
7 changes: 7 additions & 0 deletions include/clixon_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,10 @@
* If not set, client will exit
*/
#define PROTO_RESTART_RECONNECT

/*! Announce Netconf 1.1 capability as defined by RFC 6242
* Problem wih 1.1 is it requires "chunked framing" which Clixon at this point does not
* support.
* See https://github.com/clicon/clixon/issues/50 and https://github.com/clicon/clixon/issues/314
*/
#undef NETCONF_1_1_ANNOUNCE
2 changes: 2 additions & 0 deletions lib/src/clixon_netconf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,10 +1691,12 @@ netconf_hello_server(clicon_handle h,

cprintf(cb, "<hello xmlns=\"%s\" message-id=\"%u\">", NETCONF_BASE_NAMESPACE, 42);
cprintf(cb, "<capabilities>");
#ifdef NETCONF_1_1_ANNOUNCE
/* Each peer MUST send at least the base NETCONF capability, "urn:ietf:params:netconf:base:1.1"
* RFC 6241 Sec 8.1
*/
cprintf(cb, "<capability>%s</capability>", NETCONF_BASE_CAPABILITY_1_1);
#endif
/* A peer MAY include capabilities for previous NETCONF versions, to indicate
that it supports multiple protocol versions. */
cprintf(cb, "<capability>%s</capability>", NETCONF_BASE_CAPABILITY_1_0);
Expand Down

0 comments on commit 85c6c11

Please sign in to comment.