Commit graph

1632 commits

Author SHA1 Message Date
Olof hagsand
cb469a2bc7 docker: nginx install changed in alpine 2021-06-20 16:06:24 +02:00
Olof hagsand
528b649012 ci: install libnghttp2 2021-06-18 22:59:04 +02:00
Olof hagsand
9edf380f6a - Link utils statically if LINKAGE=static
- Fix event exit bug (set to new counter, dont increment)
- Changed default CI to be restconf=native instead of fcgi1~
- Tests:
  - Change to same wait backend and restconf commands
  - Change default restconf protocol from http to https
2021-06-18 22:50:30 +02:00
Olof hagsand
4b83f4198c New utility: clixon_util_validate for stand-alone application that validates or commits datastores 2021-06-18 09:54:17 +02:00
Olof hagsand
dd8883420c * Made backend transaction and commit/validate API available to plugin code.
* This enables that RPOC handles can call commit and validate via lib
  * The commit/validate API is now: `candidate_validate()` and `candidate_commit()`
2021-06-17 19:20:27 +02:00
Olof hagsand
1f7fc3afcb github actions: added sleep for internal restconf 2021-06-16 16:29:03 +02:00
Olof hagsand
917015ff3c changed alpine www-data user 2021-06-16 16:17:17 +02:00
Olof hagsand
ec3c69b9cb github actions: configure preparations 2021-06-16 14:47:23 +02:00
Olof hagsand
6bac41890d github actions: try docker test 2021-06-16 14:44:42 +02:00
Olof hagsand
8bd0aa82d6 github actions: debug wait backend/restconf 2021-06-16 14:39:28 +02:00
Olof hagsand
c814b809bb github actions: test backend run 2021-06-16 14:34:52 +02:00
Olof hagsand
cdc8924238 github actions: install curl 2021-06-16 14:30:06 +02:00
Olof hagsand
4c82562d4f github actions: clixon make util and example 2021-06-16 14:25:35 +02:00
Olof hagsand
d1013d5cce github actions: split into separate runs 2021-06-16 14:21:31 +02:00
Olof hagsand
8482bbffa9 github actions: typo prepare site.sh 2021-06-16 14:19:05 +02:00
Olof hagsand
7a2cd61015 github actions: prepare test site.sh file 2021-06-16 14:16:36 +02:00
Olof hagsand
cc7fa155f4 github actions: typo run 2021-06-16 14:08:33 +02:00
Olof hagsand
b28a7aa4a6 github actions: run inline tests, not docker 2021-06-16 14:07:13 +02:00
Olof hagsand
4b2430e007 github actions: dont add www-data 2021-06-16 14:03:01 +02:00
Olof hagsand
f7162297d3 github actions: libevent and clixon users 2021-06-16 13:51:01 +02:00
Olof hagsand
fdcb7eb9ab github actions: libevhtp 2021-06-16 13:11:18 +02:00
Olof hagsand
f66916ae57 github actions: native restconf 2021-06-16 13:09:13 +02:00
Olof hagsand
113f92ab41 Move clixon CI from travis to github actions 2021-06-16 13:06:21 +02:00
Olof hagsand
b40dafb691 * Event exit API changed to a single decrementing counter where 1 means exit.
* Removed: `clicon_exit_reset()`
  * Changed: `clicon_exit_set()` --> `clixon_exit_set(int nr)`
  * Changed: `clicon_exit_get()` --> `clixon_exit_get()`
* native restconf special case upgrade handling from http/1 -> http/2 and restconf restart: delay the restart using event exit counter
2021-06-16 11:58:13 +02:00
Olof hagsand
4f513385e9 - Restconf native http/1 to http/2 upgrade (non-tls) 2021-06-13 12:43:19 +02:00
Olof hagsand
b711faade9 grpc in shape 2021-06-11 14:42:41 +02:00
Olof hagsand
5ead099d0b * Added autotool check for getresuid (and related functions) necessary for lowering of priviliges for backend and restconf
* If getresuid is not available, CLICON_RESTCONF_PRIVILEGES must be set to 'none'
2021-06-11 14:42:41 +02:00
Olof hagsand
e24e2eb78b revert of https://github.com/clicon/clixon/pull/238 2021-06-11 14:05:19 +02:00
Olof Hagsand
92e340f462
Merge pull request #238 from mager-m/master
Fixed memory allocation for `struct dirent`
2021-06-11 11:10:34 +02:00
Olof hagsand
a122efceff * Fixed: [restconf patch method adds redundant namespaces #235](https://github.com/clicon/clixon/issues/235) 2021-06-10 13:05:03 +02:00
mager-m
af7e0458c6 Fixed memory allocation for struct dirent
While porting clixon to the RTOS Blackberry QNX there was memory corruption while reading the yang models from the disk.
Debugging led to the function `clicon_file_dirent` in `clixon_file.c` in which the `struct dirent` is copied into an array.
According to the UNIX `struct dirent` [documentation](https://man7.org/linux/man-pages/man0/dirent.h.0p.html):
>  The name of an array of char of an unspecified size should not be
>  used as an lvalue. Use of:
>
>           sizeof(d_name)
>
>  is incorrect; use:
>
>          strlen(d_name)
>
>      instead.

I adjusted the memory allocation to take the `strlen(dent->d_name)` into account.
2021-06-09 23:35:33 +02:00
Olof hagsand
7d59ec1a3a * Fixed: [JSON parsing error for a specific input. #236](https://github.com/clicon/clixon/issues/236)
* JSON empty list parse problems, eg `a:[]`
2021-06-09 11:44:28 +02:00
Olof hagsand
84f5762ab5 * Most tests work with HTTP/2 support using nghttp2
* except non-ssl http/1->/2 upgrade
* Restconf: ensure HEAD method works everywhere GET does.
2021-06-08 20:53:43 +02:00
Olof hagsand
b680e3c5ac - Restconf nghttp2 compiles 2021-06-03 22:47:54 +02:00
Olof hagsand
37da0aa45e fuzzing restconf changes, json mem error 2021-06-02 13:39:48 +02:00
Olof hagsand
0ad577fa81 - Started nghttp2 work
-  Added autoconf config options, temporary for nghttp2 development: `--disable-evhtp`and `--enable-nghttp2`.
- Added special case for api-path:s beginning with //
2021-05-31 19:11:19 +02:00
Olof hagsand
c405a08ff8 Restconf https fixes after nmap and fuzz:
- segv in PUT/POST of /
- Dont return bad request on error, just close socket
2021-05-28 16:17:52 +02:00
Olof hagsand
af88b974fd - Fuzz for restconf and cli updated 2021-05-27 20:39:49 +02:00
Olof hagsand
965cce5e5d * Added SM_RUNNING_STARTUP to translation table
* Fixed https://github.com/clicon/clixon/issues/224 yet again by addressing a mixed xml and yang namespace xpath case
2021-05-27 15:05:50 +02:00
Olof hagsand
e0c3f5467c * Added new startup-mode: running-startup: First try running db, if it is empty try startup db.
* See [Can startup mode to be extended to support running-startup mode? #234](https://github.com/clicon/clixon/issues/234)
* Improved error message on failed MUST condition
2021-05-27 13:18:01 +02:00
Olof hagsand
69af2884d0 * Fixed: [restconf patch method unable to chage value to empty string #229](https://github.com/clicon/clixon/issues/229) 2021-05-26 22:41:28 +02:00
Olof hagsand
ec4d26febf * Fixed again: [xpath function count did not work properly #224](https://github.com/clicon/clixon/issues/224)
* Must statements namespace context were given by yang node, but this is not correct, should be xml
2021-05-26 14:00:20 +02:00
Olof hagsand
164aa1cb4c * Restconf: added inline configuration using -R <xml> command line as an alternative to making advanced restconf configuration 2021-05-26 11:24:39 +02:00
Olof hagsand
1ef7a280d7 * Fixed: [when condition error under augment in restconf #227](https://github.com/clicon/clixon/issues/227)
* As part of this fix added custom constant XML_PARENT_CANDIDATE
2021-05-25 15:25:26 +02:00
Olof hagsand
5b39418e92 * [Need an option to disable restconf mandatory action of overwriting startup_db #230](https://github.com/clicon/clixon/issues/230)
* Disable RFC 8040 mandatory copy of running to startup after commit
* Rename CLICON_RESTCONF_INSTALL_DIR -> CLICON_RESTCONF_INSTALLDIR
2021-05-25 11:07:41 +02:00
Olof hagsand
60c9172d21 Fixed: [Using YANG union with decimal64 and string leads to regexp match fail #226](https://github.com/clicon/clixon/issues/226) 2021-05-24 21:05:06 +02:00
Olof Hagsand
d3b614e67d
Merge pull request #225 from nowaits/master
Fixed memleak when setting string for none string cg_var type
2021-05-24 14:53:18 +02:00
Olof hagsand
551dc707f1 slack invite, travis docker passwords 2021-05-24 13:27:03 +02:00
Olof hagsand
ae02d02d63 Several fixes to restconf internal and vagrants tests 2021-05-24 13:10:21 +02:00
Olof hagsand
603f70e51f Vagrant and test updates for restconf /www-data mods 2021-05-23 19:55:01 +02:00