]> git.proxmox.com Git - mirror_kronosnet.git/log
mirror_kronosnet.git
4 years ago[crypto] fix log information
Fabio M. Di Nitto [Tue, 30 Jul 2019 09:18:33 +0000 (11:18 +0200)]
[crypto] fix log information

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #240 from kronosnet/cov-scan
Fabio M. Di Nitto [Fri, 26 Jul 2019 13:07:32 +0000 (15:07 +0200)]
Merge pull request #240 from kronosnet/cov-scan

coverity scan fixes

4 years ago[sctp] retry locking in case of failure
Fabio M. Di Nitto [Fri, 26 Jul 2019 07:58:05 +0000 (09:58 +0200)]
[sctp] retry locking in case of failure

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[tx] clean up channel management code for internal communications
Fabio M. Di Nitto [Thu, 25 Jul 2019 09:18:19 +0000 (11:18 +0200)]
[tx] clean up channel management code for internal communications

the code is still not in use but it's more clear and doesn't trigger
memory overrun

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[nozzle] fix a few coverity errors in the test suite
Fabio M. Di Nitto [Thu, 25 Jul 2019 07:24:26 +0000 (09:24 +0200)]
[nozzle] fix a few coverity errors in the test suite

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[tx] drop unnecessary usleep when sending to localhost
Fabio M. Di Nitto [Thu, 25 Jul 2019 06:28:34 +0000 (08:28 +0200)]
[tx] drop unnecessary usleep when sending to localhost

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[common] make sure string is null terminated
Fabio M. Di Nitto [Wed, 24 Jul 2019 11:59:47 +0000 (13:59 +0200)]
[common] make sure string is null terminated

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[test] simplify flush log
Fabio M. Di Nitto [Wed, 24 Jul 2019 11:46:51 +0000 (13:46 +0200)]
[test] simplify flush log

allocate on stack only once and make sure strings are null terminated
drop useless read loop since log msg are always smaller than PAGE_SIZE
and read are atomic at that level

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[nozzle] avoid tons of possible buffer overruns
Fabio M. Di Nitto [Wed, 24 Jul 2019 09:00:00 +0000 (11:00 +0200)]
[nozzle] avoid tons of possible buffer overruns

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[PMTUd] do not double unlock global read lock
Fabio M. Di Nitto [Wed, 24 Jul 2019 06:38:56 +0000 (08:38 +0200)]
[PMTUd] do not double unlock global read lock

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[coverity] add test targets to run coverity automatically
Fabio M. Di Nitto [Tue, 23 Jul 2019 07:15:15 +0000 (09:15 +0200)]
[coverity] add test targets to run coverity automatically

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[compress] do not overrun allocated array for compress modules
Fabio M. Di Nitto [Thu, 18 Jul 2019 13:39:57 +0000 (15:39 +0200)]
[compress] do not overrun allocated array for compress modules

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[logging] make sure not to overrun buffers by pre-allocating them
Fabio M. Di Nitto [Thu, 18 Jul 2019 11:31:32 +0000 (13:31 +0200)]
[logging] make sure not to overrun buffers by pre-allocating them

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[compress] don't leak memory in case of errors during zstd init
Fabio M. Di Nitto [Thu, 18 Jul 2019 11:12:36 +0000 (13:12 +0200)]
[compress] don't leak memory in case of errors during zstd init

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[nozzle] don't leak memory on error
Fabio M. Di Nitto [Thu, 18 Jul 2019 11:09:05 +0000 (13:09 +0200)]
[nozzle] don't leak memory on error

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[nozzle] fix negative return detected by coverity scan
Fabio M. Di Nitto [Thu, 18 Jul 2019 11:04:54 +0000 (13:04 +0200)]
[nozzle] fix negative return detected by coverity scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[sctp] cleanup bugs detected in error paths by coverity scan
Fabio M. Di Nitto [Thu, 18 Jul 2019 09:57:36 +0000 (11:57 +0200)]
[sctp] cleanup bugs detected in error paths by coverity scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[acl] avoid forward null deferencing
Fabio M. Di Nitto [Thu, 18 Jul 2019 09:08:32 +0000 (11:08 +0200)]
[acl] avoid forward null deferencing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[rx] better error report if we can't resolve hostname / port
Fabio M. Di Nitto [Thu, 18 Jul 2019 08:43:58 +0000 (10:43 +0200)]
[rx] better error report if we can't resolve hostname / port

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[common] fix dlopen error handling
Fabio M. Di Nitto [Thu, 18 Jul 2019 08:36:43 +0000 (10:36 +0200)]
[common] fix dlopen error handling

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[tests] fix knet_bench coverity errors
Fabio M. Di Nitto [Thu, 18 Jul 2019 08:23:14 +0000 (10:23 +0200)]
[tests] fix knet_bench coverity errors

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[sctp] revalidate fd to make coverity scan happy
Fabio M. Di Nitto [Thu, 18 Jul 2019 05:59:01 +0000 (07:59 +0200)]
[sctp] revalidate fd to make coverity scan happy

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[handle] make sure that the pmtud buf contains at least knet header size
Fabio M. Di Nitto [Thu, 18 Jul 2019 05:50:37 +0000 (07:50 +0200)]
[handle] make sure that the pmtud buf contains at least knet header size

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[rx] align data types
Fabio M. Di Nitto [Thu, 18 Jul 2019 05:11:56 +0000 (07:11 +0200)]
[rx] align data types

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[sctp] free access list only if the socket is valid
Fabio M. Di Nitto [Thu, 18 Jul 2019 05:03:11 +0000 (07:03 +0200)]
[sctp] free access list only if the socket is valid

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[sctp] fix deference after null check
Fabio M. Di Nitto [Mon, 15 Jul 2019 13:10:15 +0000 (15:10 +0200)]
[sctp] fix deference after null check

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #238 from kronosnet/coverity_scan
Fabio M. Di Nitto [Wed, 17 Jul 2019 08:56:21 +0000 (10:56 +0200)]
Merge pull request #238 from kronosnet/coverity_scan

[coverity] add .travis.yml to integrate CI with coverity scan

4 years ago[coverity] add .travis.yml to integrate CI with coverity scan
Fabio M. Di Nitto [Wed, 17 Jul 2019 07:41:20 +0000 (09:41 +0200)]
[coverity] add .travis.yml to integrate CI with coverity scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #236 from kronosnet/queue-flush
Fabio M. Di Nitto [Fri, 28 Jun 2019 09:33:40 +0000 (11:33 +0200)]
Merge pull request #236 from kronosnet/queue-flush

[threads] allow knet_handle_setfwd to flush socket queues

4 years ago[threads] allow knet_handle_setfwd to flush socket queues
Fabio M. Di Nitto [Thu, 27 Jun 2019 08:55:23 +0000 (10:55 +0200)]
[threads] allow knet_handle_setfwd to flush socket queues

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #235 from kronosnet/minor-cleanup
Fabio M. Di Nitto [Wed, 26 Jun 2019 08:38:04 +0000 (10:38 +0200)]
Merge pull request #235 from kronosnet/minor-cleanup

Minor cleanup

4 years ago[compress] fix #if def around BZIP2 testing
Fabio M. Di Nitto [Wed, 26 Jun 2019 03:31:23 +0000 (05:31 +0200)]
[compress] fix #if def around BZIP2 testing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[compress] fix a few minor space vs tab and code formatting
Fabio M. Di Nitto [Wed, 26 Jun 2019 03:31:06 +0000 (05:31 +0200)]
[compress] fix a few minor space vs tab and code formatting

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #233 from ReyRen/compression_default_level
Fabio M. Di Nitto [Wed, 26 Jun 2019 03:11:18 +0000 (05:11 +0200)]
Merge pull request #233 from ReyRen/compression_default_level

[compress]Default compress level use

4 years ago[compress]Default compression level use
yuan ren [Tue, 25 Jun 2019 13:55:26 +0000 (21:55 +0800)]
[compress]Default compression level use

1. add test casees for a module without default.Using default
compression level.
2. Discuss with Fabio, invalid compression level not the knet
responsible for, so error logged. But if compress success but
dstLen larger than srcLen, defualt compression level will be
used, because the request level is not effective.

Signed-off-by: yuan ren <yren@suse.com>
4 years ago[tests] ignore libnss errors from OpenSuse Tumbleweed
Fabio M. Di Nitto [Tue, 25 Jun 2019 11:30:23 +0000 (13:30 +0200)]
[tests] ignore libnss errors from OpenSuse Tumbleweed

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoDefault compress level use
yuan ren [Mon, 17 Jun 2019 11:58:20 +0000 (19:58 +0800)]
Default compress level use

Discuss with Fabio, invalid compression level not the knet
responsible for, so error logged. But if compress success but
dstLen larger than srcLen, defualt compression level will be
used, because the request level is not effective.

Signed-off-by: yuan ren <yren@suse.com>
4 years agoMerge pull request #231 from kronosnet/nss-opensuse
Fabio M. Di Nitto [Mon, 17 Jun 2019 07:24:52 +0000 (09:24 +0200)]
Merge pull request #231 from kronosnet/nss-opensuse

[tests] ignore libnss errors from OpenSuse 15

4 years ago[tests] ignore libnss errors from OpenSuse 15
Fabio M. Di Nitto [Sun, 16 Jun 2019 05:41:49 +0000 (07:41 +0200)]
[tests] ignore libnss errors from OpenSuse 15

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #230 from kronosnet/minor
Fabio M. Di Nitto [Wed, 12 Jun 2019 05:33:13 +0000 (07:33 +0200)]
Merge pull request #230 from kronosnet/minor

copyright and licence update

4 years ago[global] update copyrights
Fabio M. Di Nitto [Wed, 12 Jun 2019 03:23:47 +0000 (05:23 +0200)]
[global] update copyrights

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[global] clarify license entry per file to match README.licence
Fabio M. Di Nitto [Wed, 12 Jun 2019 03:21:24 +0000 (05:21 +0200)]
[global] clarify license entry per file to match README.licence

libraries code: LGPL-2.0+
binaries code and other files: GPL-2.0+

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #229 from kronosnet/openssl-fixes
Fabio M. Di Nitto [Tue, 11 Jun 2019 14:06:16 +0000 (16:06 +0200)]
Merge pull request #229 from kronosnet/openssl-fixes

Openssl fixes

4 years ago[crypto] hide errors generated by openssl 1.1.1c
Fabio M. Di Nitto [Tue, 11 Jun 2019 09:54:08 +0000 (11:54 +0200)]
[crypto] hide errors generated by openssl 1.1.1c

see also:
https://github.com/kronosnet/kronosnet/issues/226
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930061#12

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years ago[crypto] openssl: drop calls to RAND_seed as they don´t really help RNG
Fabio M. Di Nitto [Tue, 11 Jun 2019 07:26:02 +0000 (09:26 +0200)]
[crypto] openssl: drop calls to RAND_seed as they don´t really help RNG

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930061#12 for reference

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoMerge pull request #227 from ReyRen/openssl-error-mem-free
Fabio M. Di Nitto [Thu, 6 Jun 2019 15:26:44 +0000 (17:26 +0200)]
Merge pull request #227 from ReyRen/openssl-error-mem-free

[crypto]openssl error strings release

4 years ago[crypto]openssl error strings release
yuan ren [Thu, 6 Jun 2019 05:46:01 +0000 (13:46 +0800)]
[crypto]openssl error strings release

In versions prior to OpenSSL 1.1.0, ERR_free_strings() releases
any resources created by ERR_load_crypto_strings.

Signed-off-by: yuan ren <yren@suse.com>
5 years agoMerge pull request #225 from kronosnet/ssl-reconf
Fabio M. Di Nitto [Mon, 3 Jun 2019 14:53:50 +0000 (16:53 +0200)]
Merge pull request #225 from kronosnet/ssl-reconf

Ssl reconf

5 years ago[crypto] fix openssl1.0 initialization code
Fabio M. Di Nitto [Tue, 28 May 2019 04:14:29 +0000 (06:14 +0200)]
[crypto] fix openssl1.0 initialization code

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[PMTUd] extend internal rerun API to allow full PMTUd reset
Fabio M. Di Nitto [Tue, 28 May 2019 03:35:24 +0000 (05:35 +0200)]
[PMTUd] extend internal rerun API to allow full PMTUd reset

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[crypto] rework knet_handle_crypto external API to be more solid
Fabio M. Di Nitto [Tue, 28 May 2019 03:24:47 +0000 (05:24 +0200)]
[crypto] rework knet_handle_crypto external API to be more solid

the API was rather weak and could potentially leave traffic uncrypted
in case of certain, corner case, failures.

this patch is a subset of a bigger rework of the crypto layer that
will in future allow runtime reconfiguration without traffic disruption
of the crypto config.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[crypto] make sure to trigger a PMTUd rerun on each good crypto config change
Fabio M. Di Nitto [Mon, 27 May 2019 10:42:33 +0000 (12:42 +0200)]
[crypto] make sure to trigger a PMTUd rerun on each good crypto config change

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[PMTUd] create common/shared code to trigger PMTUd rerun
Fabio M. Di Nitto [Mon, 27 May 2019 10:37:15 +0000 (12:37 +0200)]
[PMTUd] create common/shared code to trigger PMTUd rerun

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[crypto] make sure to clear all security info on crypto_fini
Fabio M. Di Nitto [Mon, 27 May 2019 10:25:55 +0000 (12:25 +0200)]
[crypto] make sure to clear all security info on crypto_fini

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #224 from kronosnet/covscan3
Fabio M. Di Nitto [Mon, 27 May 2019 03:25:55 +0000 (05:25 +0200)]
Merge pull request #224 from kronosnet/covscan3

misc: Fix more covscan warnings

5 years agomisc: Fix more covscan warnings
Christine Caulfield [Fri, 24 May 2019 09:09:47 +0000 (10:09 +0100)]
misc: Fix more covscan warnings

The only serious bug here is in transport_udp.c
(see bottom of patch), the rest are mostly detail.

covscan still reports a lot of errors against doxyxml, most of
which are because it doesn't understand the libqb hashtables.

5 years agoMerge pull request #222 from kronosnet/covscan-fixes2
Fabio M. Di Nitto [Mon, 20 May 2019 11:38:00 +0000 (13:38 +0200)]
Merge pull request #222 from kronosnet/covscan-fixes2

misc: some coverity fixes

5 years agomisc: some coverity fixes
Christine Caulfield [Fri, 17 May 2019 07:44:08 +0000 (08:44 +0100)]
misc: some coverity fixes

In rough order of seriousness:

1. Fix clock_gettime() in pmtud so that it's always called, as
   variable 'clock_now' is always read.
2. Allow space for trailing NUL in libnozzle device names
3. Fix api_nozzle_run_updown_test so it can run out of the build tree
4. Disallow a 0 length prefix in libnozzle
5. Fix potential use of NULL pointer on doxyxml
6. Free 'name' in doxyxml as it's *not* in the map any more
7. Fix dead code in libknet API functions left by code changes

5 years agoMerge pull request #220 from kronosnet/specfile
Fabio M. Di Nitto [Thu, 16 May 2019 18:26:38 +0000 (20:26 +0200)]
Merge pull request #220 from kronosnet/specfile

Specfile update

5 years ago[spec] use ldconfig_scriptlets only when defined
Fabio M. Di Nitto [Tue, 14 May 2019 04:57:36 +0000 (06:57 +0200)]
[spec] use ldconfig_scriptlets only when defined

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] drop support for init scripts
Fabio M. Di Nitto [Tue, 14 May 2019 03:53:12 +0000 (05:53 +0200)]
[spec] drop support for init scripts

no rpm distros left that support old fashion init scripts

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] fix a bunch of rpmlint errors
Fabio M. Di Nitto [Mon, 13 May 2019 04:55:36 +0000 (06:55 +0200)]
[spec] fix a bunch of rpmlint errors

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] reconciliate fedora spec file into upstream spec file (part 1)
Fabio M. Di Nitto [Mon, 13 May 2019 04:02:06 +0000 (06:02 +0200)]
[spec] reconciliate fedora spec file into upstream spec file (part 1)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] clean up useless conditionals and defines
Fabio M. Di Nitto [Sun, 12 May 2019 05:22:41 +0000 (07:22 +0200)]
[spec] clean up useless conditionals and defines

fix a couple of minor conditionals in the process

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] be more strict about plugins version and architecture depedencies
Fabio M. Di Nitto [Sun, 25 Feb 2018 08:08:10 +0000 (09:08 +0100)]
[spec] be more strict about plugins version and architecture depedencies

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] use distro conditionals to determine BuildRequires
Fabio M. Di Nitto [Sun, 25 Feb 2018 07:42:55 +0000 (08:42 +0100)]
[spec] use distro conditionals to determine BuildRequires

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[spec] fix upstream URLs to point to https and official release repo
Fabio M. Di Nitto [Sun, 12 May 2019 04:59:00 +0000 (06:59 +0200)]
[spec] fix upstream URLs to point to https and official release repo

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1708616

also to be noted, the Source0: line is different from upstream and Fedora
because upstream can handle tarballs during development

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #219 from kronosnet/udp
Fabio M. Di Nitto [Thu, 2 May 2019 09:40:37 +0000 (11:40 +0200)]
Merge pull request #219 from kronosnet/udp

udp fixes

5 years ago[udp] improve error message decoding from ICMP errors
Fabio M. Di Nitto [Wed, 1 May 2019 04:51:19 +0000 (06:51 +0200)]
[udp] improve error message decoding from ICMP errors

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[udp] use defines vs hardcoded numbers
Fabio M. Di Nitto [Wed, 1 May 2019 04:39:53 +0000 (06:39 +0200)]
[udp] use defines vs hardcoded numbers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #217 from kronosnet/man-fix
Fabio M. Di Nitto [Tue, 30 Apr 2019 09:01:25 +0000 (11:01 +0200)]
Merge pull request #217 from kronosnet/man-fix

Man fix

5 years ago[man] fix libknet.h for errors detected by newly added test
Fabio M. Di Nitto [Tue, 30 Apr 2019 03:42:48 +0000 (05:42 +0200)]
[man] fix libknet.h for errors detected by newly added test

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[tests] add man page check to verify doxy header order and definitions
Fabio M. Di Nitto [Tue, 30 Apr 2019 03:42:16 +0000 (05:42 +0200)]
[tests] add man page check to verify doxy header order and definitions

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[man] fix knet_host_set_policy parameters order
Fabio M. Di Nitto [Tue, 30 Apr 2019 03:06:47 +0000 (05:06 +0200)]
[man] fix knet_host_set_policy parameters order

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #216 from kronosnet/tidy_manpages2
Fabio M. Di Nitto [Mon, 29 Apr 2019 15:18:01 +0000 (17:18 +0200)]
Merge pull request #216 from kronosnet/tidy_manpages2

man: Tidy more man pages

5 years agoman: Tidy more man pages
Christine Caulfield [Mon, 29 Apr 2019 14:16:27 +0000 (15:16 +0100)]
man: Tidy more man pages

Followup to previous 'tidy'

5 years agoman: Tidy manpages (#215)
Chrissie Caulfield [Tue, 16 Apr 2019 13:46:01 +0000 (14:46 +0100)]
man: Tidy manpages (#215)

* man: Tidy manpages for libnozzle

doxygen works in mysterious ways, adding a blank line before
@brief makes the lines following that much tidier.

So now instead of

nozzle_close nozzle - pointer to the nozzle struct to destroy

we get:

nozzle_close

       nozzle - pointer to the nozzle struct to destroy

* doxyxml: Cope with pointers-to-pointers passed as params

Double pointers showed as ' * *name' when they should be '  **name'.

Also tidy STRUCTURES display so that they are not indented too much,

* man: Similar @brief fixes for libknet.h

* doxyxml: Tidy descriptions of functions as parameters

If a complex function pointer was passed as a parameter then doxyxml
tryied to line up all the other parameters with it - making a mess
by having lots of blank space between the type and the name.

Now we enforce a maximum type length (a line-ish) so that shorter
tyopes will line up OK and the really long ones will be left to their
own devices.

5 years agoMerge pull request #214 from kronosnet/3des
Fabio M. Di Nitto [Thu, 11 Apr 2019 12:49:40 +0000 (14:49 +0200)]
Merge pull request #214 from kronosnet/3des

[crypto] remove libnss 3des support

5 years ago[crypto] remove libnss 3des support
Fabio M. Di Nitto [Thu, 11 Apr 2019 11:36:56 +0000 (13:36 +0200)]
[crypto] remove libnss 3des support

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #213 from kronosnet/zstd
Fabio M. Di Nitto [Thu, 11 Apr 2019 10:18:54 +0000 (12:18 +0200)]
Merge pull request #213 from kronosnet/zstd

[compress] add support for libzstd

5 years ago[tests] improve wait for packet implementation to flush logs during wait
Fabio M. Di Nitto [Thu, 11 Apr 2019 07:31:00 +0000 (09:31 +0200)]
[tests] improve wait for packet implementation to flush logs during wait

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[tests] hide an arm internal memory leak (non-recurring)
Fabio M. Di Nitto [Thu, 11 Apr 2019 07:30:27 +0000 (09:30 +0200)]
[tests] hide an arm internal memory leak (non-recurring)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[compress] add support for libzstd
Fabio M. Di Nitto [Wed, 10 Apr 2019 06:40:50 +0000 (08:40 +0200)]
[compress] add support for libzstd

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #212 from Fabian-Gruenbichler/pr/crypto_upgrade
Fabio M. Di Nitto [Tue, 9 Apr 2019 13:32:34 +0000 (15:32 +0200)]
Merge pull request #212 from Fabian-Gruenbichler/pr/crypto_upgrade

crypto: reduce minimum key size to 1024bit

5 years agoreduce minimum crypto key size to 1024bit
Fabian Grünbichler [Wed, 3 Apr 2019 12:28:50 +0000 (14:28 +0200)]
reduce minimum crypto key size to 1024bit

Since the key is used for AES/3DES and HMAC operations only, this is
safe. AES/3DES use keys in the 128- to 256-bit range, HMAC with
MD5/SHA1/SHA2 should use keys with a minimum of 128- to 512-bit (in both
cases, depending on the actual algorithm used).

This reduction also keeps knet compatible with existing Corosync 2.x
keyfiles, which are 1024-bit.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agoMerge pull request #210 from kronosnet/dont-allow-mixed-family-links
Fabio M. Di Nitto [Tue, 26 Mar 2019 14:07:14 +0000 (15:07 +0100)]
Merge pull request #210 from kronosnet/dont-allow-mixed-family-links

link: Check address families on a link always match

5 years ago[global] update copyright across the board
Fabio M. Di Nitto [Tue, 26 Mar 2019 12:45:52 +0000 (13:45 +0100)]
[global] update copyright across the board

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agolink: Check address families on a link always match
Christine Caulfield [Tue, 26 Mar 2019 12:44:25 +0000 (13:44 +0100)]
link: Check address families on a link always match

We can't create a link with a source address of a different
address family than the destination as all sends will fail.

5 years agoMerge pull request #208 from kronosnet/fixes
Fabio M. Di Nitto [Tue, 26 Mar 2019 02:31:29 +0000 (03:31 +0100)]
Merge pull request #208 from kronosnet/fixes

important fixes

5 years ago[transports] fix usage after free of transport info memory
Fabio M. Di Nitto [Sun, 24 Mar 2019 06:29:57 +0000 (07:29 +0100)]
[transports] fix usage after free of transport info memory

spotted while implementing functional testing for rekey.

when configuring multiple hosts (3+) with 1 link sharing
the same listener, but NOT enabling the link, if the user
attempts to shutdown knet_h, the first call to knet_link_clear_config
will not recognize that the listener is still in use by another
link and will release all resources.
At the time of invoking clear_config on the second link, transport_clear_config
will access already freed memory, or alternatively, a call to
link_enable would cause a crash because the listener does no
longer exist.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[tests] test rpm should match currently installed version of libknet
Fabio M. Di Nitto [Fri, 15 Mar 2019 06:00:47 +0000 (07:00 +0100)]
[tests] test rpm should match currently installed version of libknet

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agomanpages: Document enums (#206)
Chrissie Caulfield [Tue, 12 Mar 2019 13:55:25 +0000 (13:55 +0000)]
manpages: Document enums (#206)

And also fix a bug in structure printing that caused it to print the wrong name for a struct.

5 years agoMerge pull request #203 from kronosnet/test-rpm
Fabio M. Di Nitto [Mon, 11 Mar 2019 16:53:11 +0000 (17:53 +0100)]
Merge pull request #203 from kronosnet/test-rpm

enable shipping of the testsuite

5 years ago[tests] allow shipping of the test suite
Fabio M. Di Nitto [Thu, 7 Mar 2019 18:28:19 +0000 (19:28 +0100)]
[tests] allow shipping of the test suite

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[tests] remove stray comment
Fabio M. Di Nitto [Thu, 7 Mar 2019 17:42:20 +0000 (18:42 +0100)]
[tests] remove stray comment

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #205 from kronosnet/link-info
Fabio M. Di Nitto [Mon, 11 Mar 2019 10:44:33 +0000 (11:44 +0100)]
Merge pull request #205 from kronosnet/link-info

[host] increase log level for currently used links

5 years ago[host] increase log level for currently used links
Fabio M. Di Nitto [Mon, 11 Mar 2019 05:30:17 +0000 (06:30 +0100)]
[host] increase log level for currently used links

bug reported on IRC by yuanren

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years agoMerge pull request #204 from kronosnet/sctp-fixes
Fabio M. Di Nitto [Mon, 11 Mar 2019 09:54:03 +0000 (10:54 +0100)]
Merge pull request #204 from kronosnet/sctp-fixes

Sctp fixes

5 years ago[logging] fix log target of recently added API calls
Fabio M. Di Nitto [Sat, 9 Mar 2019 06:03:25 +0000 (07:03 +0100)]
[logging] fix log target of recently added API calls

spotted during sctp testing

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
5 years ago[transport] don´t specify destination address for connection oriented protocols
Fabio M. Di Nitto [Mon, 11 Mar 2019 04:30:33 +0000 (05:30 +0100)]
[transport] don´t specify destination address for connection oriented protocols

some implementations of sendto/sendmsg expects dst_addr / msg_name to be
empty for connection oriented protocols such as SCTP (spotted on FreeBSD).

Make sure to clear or not pass those information on connection oriented protocol.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>