Commit graph

423 commits

Author SHA1 Message Date
Olof hagsand
26d37352f4 NETCONF hello error handling, changed YANG PATCH enabling, refactored static linking
NETCONF hello errors, such as wrong session-id, prefix, namespace terminates session
  * Instead of returning an rpc-error reply
Changed YANG PATCH enabling:
  * Now: `./configure --enable-yang-patch`
  * Before: set YANG_PATCH constant in `include/clixon_custom.h`
Refactored Makefile for static linking
2021-10-05 12:04:53 +02:00
Olof hagsand
d175720b7e Cleaned up Makefiles, especially LINKAGE=static vs dynamic
Added LIBSTATIC_SUFFIX instead of hardcoded .a
Changed building of build.c not to be triggered by install
2021-09-30 21:40:46 +02:00
Olof hagsand
51278d5901 Fixed static linking for coverage and fuzzing
Preparations for Clixon 5.3 release
2021-09-27 12:26:53 +02:00
Olof hagsand
5a875e3152 Fix some LINKAGE=static compile issues:
- Makefile circularity by fixing .so suffix
- simplify example/main Makefile
2021-09-26 11:22:48 +02:00
Olof hagsand
b70e22096e - Pagination: enabled LIST_PAGINATION and remobved constant
- Changed logic on how to find clixon_restconf in pseudo plugin
- Removed ==== in constants to avoid conflict with git merge
- Remove assert
- Added fuzzing for netconf
2021-09-23 13:33:26 +02:00
Olof hagsand
47141089c2 - Added netconf to fuzz
- Restconf internal start more robust
- Restconf fcgi fix
2021-09-22 18:55:32 +02:00
Olof hagsand
55377786c1 Fix tests for http/1 and http/2 only respectively 2021-09-21 21:23:33 +02:00
Olof hagsand
a046306270 - New netconf-specific uint32 parse functions
- Added failure handling to xpath traverse_canonical
- Started pagination cli code
2021-09-21 11:24:53 +02:00
Olof hagsand
390b0886ed - pageing offset working 2021-09-21 11:24:53 +02:00
Olof hagsand
fb0b9409f3 - Moved restrconf code from pageing rpc to get 2021-09-21 11:24:53 +02:00
Olof hagsand
76e59873c2 - Changed media name: yang.collection+xml/yang to application-collection+xml/json
- Modified ietf-netconf-list-pagination.yang:
     - changed get-pagable ->  get-pageable
     - renamed count -> limit
     - renamed skip -> offset
     - added import ietf-yang-metadata
     - added md:annotation remaining
2021-09-21 11:22:41 +02:00
Olof hagsand
0c7f2043f3 * Pagination according to new draft
* count/skip -> limit/offset
* ietf-yang-metadata RFC 7952 support, placeholder parsing and extension
2021-09-21 11:22:41 +02:00
Olof hagsand
77bacc93bb - Updated code to clixon 5.2 status
- Added LIST_PAGINATION clixon_custom constant
- Fix: leafs added as augments on rpc input/output lacked cv:s
2021-09-21 11:22:40 +02:00
Olof hagsand
2485bec483 fixes for compilation 2021-09-21 11:22:40 +02:00
Olof hagsand
2b5dceb82c cli pagination 2021-09-21 11:22:40 +02:00
Olof hagsand
acc6a0fec7 First working prototype 2021-09-21 11:22:40 +02:00
Olof hagsand
2e857bb417 First working prototype 2021-09-21 11:22:40 +02:00
Olof hagsand
392e6679c5 * JSON errors are now labelled with JSON and not XML
* Fixed: [Performance issue when parsing large JSON param](https://github.com/clicon/clixon/issues/266)
* Moved strlen() from for end condition
* Fixed debugging of xpath parser
2021-09-20 21:35:01 +02:00
Olof hagsand
d1ed4ecd7d - Refactor yang patch code according to Clixon coding style
- Fixed all memory leaks
2021-09-08 10:38:49 +02:00
Olof hagsand
aed7dbfd8b - Restconf error: added special case for translating from netconf invalid-value to 400 vs 404
- Added media to restconf sanity checks, such as bad client cert error
2021-08-27 15:12:50 +02:00
Olof hagsand
cdacca125c Native restconf: SSL client certs failures are returned as http 405 errors, not fail during SSL negotiation 2021-08-27 09:33:59 +02:00
Olof hagsand
ef4d082f4b * Restconf native HTTP/2:
* Added option `CLICON_RESTCONF_HTTP2_PLAIN`
    * if disabled non-tls HTTP/2 is disabled: both direct and upgrade
2021-08-26 16:58:52 +02:00
Olof hagsand
6e0e45aab7 * Fixed: Some native restconf error messages did not end with \r\n.
* Specifically the error when sending http request on https.
2021-08-20 15:45:13 +02:00
Olof hagsand
8db716ca07 - Moved yang patch code to new files restconf_methods_patch.[ch]
- Started modifying patch code to style guidelines
- Made patch test independent of example
- Added developers style guidelines
2021-08-15 20:43:52 +02:00
Olof hagsand
bd8cbbc393 Merge branch 'alanyanigersiklu-yang-patch-alanfork' 2021-08-10 19:50:27 +02:00
Alan Yaniger
f2e81be66e fix merge conflicts 2021-08-06 12:08:13 +03:00
Alan Yaniger
94b8f7fec5 fixed another rebase error 2021-08-05 15:39:27 +03:00
Alan Yaniger
ad950efc32 fixed check when getting value inside xml tag given the key 2021-08-05 15:16:29 +03:00
Alan Yaniger
523407a9c1 fixed string length checks, removed unnecessary loop, changed some other code for clarity 2021-08-05 15:16:29 +03:00
Alan Yaniger
fd28fd498d - Add prefix "yang_patch_" to new functions
- use clixon cbuf functions instead of new string functions
 - moved some code into separate functions
 - added comments
 - added documentation to functions that did not have it
2021-08-05 15:16:29 +03:00
Olof hagsand
128764a570 - Added yang patch test: test_restconf_yang_patch.sh as placeholder for rfc 8072 tests
- Added patch-xml as valid media
2021-08-05 15:15:28 +03:00
Olof hagsand
659aaac5c6 - cli set debug vars
- fixed: restconf native evhtp appended indata to old data
2021-08-05 15:15:28 +03:00
Alan Yaniger
86b64c4dd0 split up long function, use safe string handling functions 2021-08-05 15:15:28 +03:00
Alan Yaniger
8d2fbf39de implement yang-patch 2021-08-05 15:15:28 +03:00
Alan Yaniger
d1f44e2f1f fixed check when getting value inside xml tag given the key 2021-08-01 17:01:40 +03:00
Alan Yaniger
db7e016aa0 fixed string length checks, removed unnecessary loop, changed some other code for clarity 2021-08-01 16:50:04 +03:00
Alan Yaniger
948fa70b44 - Add prefix "yang_patch_" to new functions
- use clixon cbuf functions instead of new string functions
 - moved some code into separate functions
 - added comments
 - added documentation to functions that did not have it
2021-07-27 18:36:46 +03:00
Olof hagsand
600f29a117 - Added yang patch test: test_restconf_yang_patch.sh as placeholder for rfc 8072 tests
- Added patch-xml as valid media
2021-07-26 12:20:06 +02:00
Olof hagsand
c1c4e5b3f3 - cli set debug vars
- fixed: restconf native evhtp appended indata to old data
2021-07-26 10:46:00 +02:00
Alan Yaniger
46d07c1372 split up long function, use safe string handling functions 2021-07-25 09:04:26 +03:00
Olof hagsand
f7f24949d6 Merge branch 'yang-patch-alanfork' of https://github.com/alanyanigersiklu/clixon into alanyanigersiklu-yang-patch-alanfork 2021-07-19 22:54:00 +02:00
Alan Yaniger
0c72100a05 implement yang-patch 2021-07-19 13:17:10 +03:00
Olof hagsand
e0ee365958 * Fixed: RFC 8040 yang-data extension allows non-key lists
* Added YANG_FLAG_NOKEY as exception to mandatory key lists
2021-07-19 11:15:49 +02:00
Olof hagsand
270c47b396 Native restconf fixes:
- memleak in http/1-only
- exit if http/1 request sent to http/2-only
- hang if http/1 TLS request sent to http/2 only
2021-07-09 15:08:21 +02:00
Olof hagsand
ef131cf407 * 5.2.0 preparations
* Restconf native openssl - ifdef SSL_get0_next_proto_negotiated
2021-07-01 16:34:38 +02:00
Olof hagsand
85e2945ec9 * Netconf message-id attribute changed from optional to mandatory
* Made NETCONF message handling more strict according to RFC 6241
  * Set `CLICON_NETCONF_MESSAGE_ID_OPTIONAL` to true to accept omission of message-id attribute
* Fixed: [need make sure message-id exist in rpc validate #240](https://github.com/clicon/clixon/issues/240)
2021-06-30 10:59:10 +02:00
Olof hagsand
3539a80d5e restconf fcgi mem leak in indata
test pkill needs sleep before name settles
2021-06-27 16:40:27 +02:00
Olof Hagsand
b46418d774 Minor test and type fixes 2021-06-26 21:27:59 +00:00
Olof Hagsand
e451b7f43e - changed debug printfs to work for i386
- restconf native centos8: fixed ssl shutdown error
- libnghttp2 older version patch
2021-06-26 08:38:23 +00:00
Olof Hagsand
b31107f646 - Restconf native: Fixed ssl/non-ssl read/write behaviour for data that is different in freebsd than in linux
- test: removed sed -i in tests since it is not portable between linux and bsd
2021-06-25 10:48:55 +00:00