* Fixed: [CLIXON is not waiting for the hello message #184](https://github.com/clicon/clixon/issues/184)

* Hello message semantics has been made stricter according to RFC 6241 Sec 8.1, for example:
  * A client MUST send a <hello> element.
  * Each peer MUST send at least the base NETCONF capability, "urn:ietf:params:netconf:base:1.1" (or 1.0 for RFC 4741)
  * The netconf client will terminate (close the socket) if the client does not comply
  * You can set `CLICON_NETCONF_HELLO_OPTIONAL` to true to use the old behavior of essentially ignoring hellos.
* New clixon-config@2020-03-08.yang revision
  * Added: `CLICON_NETCONF_HELLO_OPTIONAL`
* The base capability has been changed to "urn:ietf:params:netconf:base:1.1" following RFC6241.
This commit is contained in:
Olof hagsand 2021-03-10 13:56:53 +01:00
parent 608f298ed9
commit 5692072d36
81 changed files with 1189 additions and 1351 deletions

View file

@ -40,6 +40,31 @@
#ifndef _CLIXON_NETCONF_LIB_H
#define _CLIXON_NETCONF_LIB_H
/*
* Constants
*/
/* Default NETCONF namespace (see rfc6241 3.1)
* See USE_NETCONF_NS_AS_DEFAULT for use of this namespace as default
* Also, bind it to prefix:nc as used by, for example, the operation attribute
* (also in RFC4741 Sec 3.1)
* BTW this may not be the best way to keep them.
*/
#define NETCONF_BASE_NAMESPACE "urn:ietf:params:xml:ns:netconf:base:1.0"
#define NETCONF_BASE_PREFIX "nc"
/* Netconf base capability as defined in RFC4741, Sec 8.1
*/
#define NETCONF_BASE_CAPABILITY_1_0 "urn:ietf:params:netconf:base:1.0"
/* Netconf base capability as defined in RFC6241, Sec 8.1
*/
#define NETCONF_BASE_CAPABILITY_1_1 "urn:ietf:params:netconf:base:1.1"
/* See RFC 7950 Sec 5.3.1: YANG defines an XML namespace for NETCONF <edit-config>
* operations, <error-info> content, and the <action> element.
*/
#define YANG_XML_NAMESPACE "urn:ietf:params:xml:ns:yang:1"
/*
* Types
*/

View file

@ -46,18 +46,6 @@
* Constants
*/
/* Default NETCONF namespace (see rfc6241 3.1)
* See USE_NETCONF_NS_AS_DEFAULT for use of this namespace as default
* Also, bind it to prefix:nc as used by, for example, the operation attribute
*/
#define NETCONF_BASE_NAMESPACE "urn:ietf:params:xml:ns:netconf:base:1.0"
#define NETCONF_BASE_PREFIX "nc"
/* See RFC 7950 Sec 5.3.1: YANG defines an XML namespace for NETCONF <edit-config>
* operations, <error-info> content, and the <action> element.
*/
#define YANG_XML_NAMESPACE "urn:ietf:params:xml:ns:yang:1"
/* Input symbol for netconf edit-config (+validate)
* ietf-netconf.yang defines is as input:
* choice edit-content {