]>
git.proxmox.com Git - mirror_kronosnet.git/log
Fabio M. Di Nitto [Fri, 22 Dec 2017 06:01:11 +0000 (07:01 +0100)]
[nozzle] move set up and down to the stable API section
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Dec 2017 05:51:10 +0000 (06:51 +0100)]
[nozzle] decouple running pre-up.d/up.d/down.d/post-down.d from interface status (part 4)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Dec 2017 04:32:05 +0000 (05:32 +0100)]
[nozzle] decouple running pre-up.d/up.d/down.d/post-down.d from interface status (part 3)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Dec 2017 04:25:57 +0000 (05:25 +0100)]
[nozzle] decouple running pre-up.d/up.d/down.d/post-down.d from interface status (part 2)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Dec 2017 04:07:33 +0000 (05:07 +0100)]
[nozzle] decouple running pre-up.d/up.d/down.d/post-down.d from interface status (part 1)
provide the facility to do it via nozzle_run_updown but delegate the task to
the application.
This has the benefit of much better fine grained control over errors during those
code paths.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 13:09:17 +0000 (14:09 +0100)]
[nozzle] move find_ip to internals
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 12:28:33 +0000 (13:28 +0100)]
[nozzle] move ipv4 broadcast to internals
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 07:53:22 +0000 (08:53 +0100)]
[nozzle] cleanup mac address functions
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 05:15:30 +0000 (06:15 +0100)]
[nozzle] move code around to reflect public API and internal functions
cleanup _get_mtu in the process
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 05:01:06 +0000 (06:01 +0100)]
[nozzle] move code around to reflect completion and drop copy of code from internals.c
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 04:47:19 +0000 (05:47 +0100)]
[nozzle] rename _check to is_valid_nozzle, make it more useful and fixup error code checking
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 04:22:26 +0000 (05:22 +0100)]
[nozzle] be more explicit on function naming (part 2)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 20 Dec 2017 04:21:34 +0000 (05:21 +0100)]
[nozzle] be more explicit on function naming
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 19 Dec 2017 05:04:32 +0000 (06:04 +0100)]
[nozzle] start cleaning internal function names
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 18 Dec 2017 06:17:39 +0000 (07:17 +0100)]
[nozzle] split code around to separate libnozzle and testsuite
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 18 Dec 2017 05:51:13 +0000 (06:51 +0100)]
[build] split tests, man pages and build dirs
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 18 Dec 2017 05:35:10 +0000 (06:35 +0100)]
[nozzle] rename lib_mutex to config_mutex
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:47:40 +0000 (06:47 +0100)]
[build] fix build on BSD
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:43:45 +0000 (06:43 +0100)]
[cleanup] document nozzle_iface struct, drop unnecessary ifr struct and cleanup names
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:17:51 +0000 (06:17 +0100)]
[cleanup] rename ip_addr to ipaddr
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:14:37 +0000 (06:14 +0100)]
[cleanup] rename sockfd to ioctlfd
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:12:15 +0000 (06:12 +0100)]
[cleanup] rename struct _ip to struct nozzle_ip and cleanup related defines
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 05:01:32 +0000 (06:01 +0100)]
[nozzle] rename _config to nozzle_lib_config
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 7 Dec 2017 04:57:41 +0000 (05:57 +0100)]
[cleanup] start splitting the code across multiple files
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 20 Nov 2017 05:43:28 +0000 (06:43 +0100)]
[nozzle] cleanup and document nozzle_get_fd
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 20 Nov 2017 05:40:04 +0000 (06:40 +0100)]
[nozzle] cleanup and document nozzle_get_name_by_handle
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 20 Nov 2017 05:36:29 +0000 (06:36 +0100)]
[nozzle] cleanup and document nozzle_get_handle_by_name
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 20 Nov 2017 05:26:01 +0000 (06:26 +0100)]
[nozzle] cleanup and document nozzle_(re)set_mac
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 20 Nov 2017 05:21:55 +0000 (06:21 +0100)]
[nozzle] cleanup and document nozzle_get_mac
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Christine Caulfield [Fri, 17 Nov 2017 14:41:07 +0000 (14:41 +0000)]
Tidy some English
Fabio M. Di Nitto [Thu, 16 Nov 2017 17:02:08 +0000 (18:02 +0100)]
[nozzle] cleanup and document nozzle_set_mtu and nozzle_reset_mtu
couldn't split those 2 because they are stricly related
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 16:40:20 +0000 (17:40 +0100)]
[nozzle] cleanup and document nozzle_get_mtu
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 16:25:16 +0000 (17:25 +0100)]
[nozzle] fix test on BSD
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 16:18:04 +0000 (17:18 +0100)]
[nozzle] cleanup and document nozzle_get_ips (part 1)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 16:04:36 +0000 (17:04 +0100)]
[nozzle] cleanup and document nozzle_del_ip
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 15:52:35 +0000 (16:52 +0100)]
[nozzle] cleanup and document nozzle_add_ip
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 15:28:52 +0000 (16:28 +0100)]
[nozzle] re-order functions in order of importance
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 15:23:09 +0000 (16:23 +0100)]
[nozzle] cleanup and document nozzle_set_down
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 15:18:08 +0000 (16:18 +0100)]
[nozzle] cleanup and document nozzle_set_up
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 14:51:18 +0000 (15:51 +0100)]
[nozzle] start to cleanup nozzle_close to be more informative and effective
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 14:21:07 +0000 (15:21 +0100)]
[nozzle] cleanup nozzle_open coding style and return codes
also update the header file for Doxygen man pages
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 13:03:56 +0000 (14:03 +0100)]
[nozzle] rename last tap bits to nozzle
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:52:08 +0000 (13:52 +0100)]
[nozzle] rename API from tap_ to nozzle_
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:51:43 +0000 (13:51 +0100)]
[nozzle] fix pkg-config to point to nozzle
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:48:38 +0000 (13:48 +0100)]
[nozzle] rename struct _iface to nozzle_iface (looks better on public headers)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:46:19 +0000 (13:46 +0100)]
[nozzle] rename tap_t to nozzle_t
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:44:19 +0000 (13:44 +0100)]
[nozzle] include net/if.h to define IFNAMSIZ instead of redefine
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 12:43:53 +0000 (13:43 +0100)]
[nozzle] add Doxygen header
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 05:41:25 +0000 (06:41 +0100)]
[libnozzle] rename libtap to libnozzle (part 1)
Our fearless Debian maintainer wferi made us aware that TAP is an overloaded
term already and it would be very confusing to add yet another one.
nozzle is a good pick from http://www.thesaurus.com/browse/tap
I am sure lib*cock* would have cause havoc :-)
This commit only rename files and allow builds. The API needs to be renamed too,
but that will come over time with major code cleanup as documented here:
https://trello.com/c/pyEKd4UH/396-libnozzle-make-it-production-ga-ready
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Nov 2017 05:18:57 +0000 (06:18 +0100)]
[libtap] BSD: switch to ioctl to destroy tap devices
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 10 Nov 2017 15:55:23 +0000 (16:55 +0100)]
[libtap] define IFNAMSIZ for applications that don't need/want to include net/if.h
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 9 Nov 2017 13:24:56 +0000 (14:24 +0100)]
[libtap] update README for BSD
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 9 Nov 2017 07:29:26 +0000 (08:29 +0100)]
[libtap] port to freebsd and fix a bunch of small bugs
- tap_open: do mutex lock only after malloc to avoid deadlock
- fix test suite to increase randomness when testing named tap devices
- remove hardcoded paths to /bin/true /bin/false and /bin/grep
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 7 Nov 2017 10:08:32 +0000 (11:08 +0100)]
[libtap] tests: add better IPv6 private address space randomization
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 7 Nov 2017 08:33:07 +0000 (09:33 +0100)]
[libtap] tests: allow random localhost IPs for testing
- avoids clashing with machine routing
- allows parallel testing
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Christine Caulfield [Thu, 13 Dec 2018 09:59:30 +0000 (09:59 +0000)]
UDP: Cope with EPERM returned from sendmsg/sendto
IPtables can cause -EPERM to be returned from socket sends, so
we need to be able to handle it without going into a spin.
SCTP seems to be unaffected.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Pokorný [Mon, 3 Dec 2018 10:36:55 +0000 (11:36 +0100)]
[misc] fix a few typos/stylistics
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Chen Jingpiao [Thu, 22 Nov 2018 05:23:42 +0000 (13:23 +0800)]
[tests] update error message in api_knet_{addrtostr,strtoaddr}.c
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Thu, 22 Nov 2018 05:20:07 +0000 (13:20 +0800)]
[tests] fix check condition in api_knet_{addrtostr,strtoaddr}.c
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Tue, 27 Nov 2018 02:46:49 +0000 (10:46 +0800)]
clear the errno in each exported API when the call success
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Fabio M. Di Nitto [Tue, 20 Nov 2018 04:31:58 +0000 (05:31 +0100)]
[openssl] fix return type for pthread_self
spotted on freebsd-devel
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Chen Jingpiao [Sun, 11 Nov 2018 06:49:09 +0000 (14:49 +0800)]
[tx] fix tx_uncompressed_packets stats collect in _parse_recv_from_sock
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Tue, 13 Nov 2018 02:24:53 +0000 (10:24 +0800)]
[rx] fix incorrect packet length in _parse_recv_from_links
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Fri, 9 Nov 2018 09:47:17 +0000 (17:47 +0800)]
[tx] remove goto statement to improve readability
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Mon, 12 Nov 2018 02:50:54 +0000 (10:50 +0800)]
Add static qualifier to {compress, crypto, transport}_modules_cmds
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Chen Jingpiao [Mon, 12 Nov 2018 02:30:18 +0000 (10:30 +0800)]
[transports] fix transport_modules_cmd array out of range
Fixes: 18ab4888
Signed-off-by: Chen Jingpiao <jchen@suse.com>
Fabio M. Di Nitto [Wed, 7 Nov 2018 13:27:16 +0000 (14:27 +0100)]
[build] fix supported compiler warning detection
move from AC_PREPROC_IFELSE (strongly discouraged) to AC_COMPILE_IFELSE
our detection system was very weak and recent versions of clang did
show that PREPROC_IFELFE (cpp) would enable warning options that
the compiler does not support (clang).
use a full compilation test to detect what works and what doesn't.
Also expand the warning list to include new / renamed clang options
of equivalents already enabled for older versions of clang and gcc.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Chen Jingpiao [Wed, 31 Oct 2018 08:09:44 +0000 (16:09 +0800)]
tests: fix output message
Fixes: 04537c57 ("[transports] cleanup API calls")
Signed-off-by: Chen Jingpiao <chenjingpiao@gmail.com>
Chen Jingpiao [Mon, 5 Nov 2018 02:22:45 +0000 (10:22 +0800)]
fix typo
Signed-off-by: Chen Jingpiao <chenjingpiao@gmail.com>
Chen Jingpiao [Mon, 5 Nov 2018 02:10:44 +0000 (10:10 +0800)]
man: update XML directory in doxyxml.c
Fixes: 31945b18 ("[man] move libknet man pages and man pages build tools to top level dir")
Signed-off-by: Chen Jingpiao <chenjingpiao@gmail.com>
Christine Caulfield [Mon, 22 Oct 2018 15:10:08 +0000 (16:10 +0100)]
misc: keep covscan happy
covscan complains about is ignoring returns from pthread_mutex_lock()
but in those 2 circumstances we don't have much choice.
This patch just keeps coverity quiet so we don't miss any real bugs it
might find.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Fabio M. Di Nitto [Mon, 22 Oct 2018 08:40:16 +0000 (10:40 +0200)]
Merge pull request #155 from kronosnet/stable1-proposed
Stable1 proposed
Christine Caulfield [Fri, 19 Oct 2018 12:13:47 +0000 (13:13 +0100)]
links: Don't close loopback link
knet_link_clear_config would incorrectly clear the local
loopback link if the last 'real' link to an external node
was closed. We didn't check the nodeid in the code, just
the link number when clearing the loopback flag.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse [Mon, 1 Oct 2018 09:39:09 +0000 (11:39 +0200)]
Import key with length not dividable by wrap key block size
Wrapping of the key is standard crypto operation which needs data
aligned to cipher block size, otherwise it fails.
Possible solution is to use a zero filled buffer with size aligned to
required wrap key block size. Private key is copied to the beginning of
the buffer and unwrap operation keeps using only required private key
size.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto [Tue, 11 Sep 2018 14:09:09 +0000 (16:09 +0200)]
[tests] clear errno to avoid incorrect propagation from void fn call
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 11 Sep 2018 14:07:41 +0000 (16:07 +0200)]
[tests] fix select(2) handling (mostly affects slow machines)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 6 Sep 2018 11:32:06 +0000 (13:32 +0200)]
[threads] make it easier to debug thread startup / stop operations with pretty names
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse [Tue, 4 Sep 2018 16:02:19 +0000 (18:02 +0200)]
Use gitarchive-version for spec file
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse [Mon, 3 Sep 2018 15:43:03 +0000 (17:43 +0200)]
git-version-gen fail on UNKNOWN version
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse [Tue, 4 Sep 2018 15:52:11 +0000 (17:52 +0200)]
Do not match lightweight tags in git-version-gen
Fix leftover from
175b517fd71d999150aa701ec847510490a18a6e which added
matching of lightweight git tags.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse [Tue, 4 Sep 2018 15:51:21 +0000 (17:51 +0200)]
Support for git archive stored tags
Attempt to solve problem with git archive generated tarballs
(used for example by github when release is downloaded) which are no
longer git tree and (in contrast to officially released tarballs) also
doesn't contain .tarball-version file so git-version-gen script simply
cannot obtain valid version info.
Solution is based on using gitattributes which is instructs git to
replace string in the .gitarchivever file by known ref names.
git-version-gen is enhanced to support this file and tries to parse
any string which looks like "tag: v[0-9][^,)]*". If such string
is found it's used as a version. This file is used as a last attempt and
other methods (.tarball-version, git abbrev) have precedence.
Based on idea stated by Jan Pokorný <jpokorny@redhat.com>.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto [Thu, 16 Aug 2018 06:01:53 +0000 (08:01 +0200)]
[tests] drop arm exceptions as they have been fixed in glibc
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 16 Aug 2018 05:01:29 +0000 (07:01 +0200)]
[tests] cleanup nss memcheck supports
add one more exception for newer nss (spotted on fedora rawhide)
drop FreeBSD excetions as we don't support running under valgrind on BSD
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 7 Aug 2018 09:21:23 +0000 (11:21 +0200)]
Merge pull request #150 from kronosnet/stable1-proposed
stable1-proposed
Fabio M. Di Nitto [Wed, 1 Aug 2018 12:21:38 +0000 (14:21 +0200)]
[threads] use internal array to track status of threads (running/stopped) vs a random sleep()
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 1 Aug 2018 05:56:21 +0000 (07:56 +0200)]
[tests] don't redefine symbols from the main library
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 30 Jul 2018 16:15:24 +0000 (18:15 +0200)]
[tests] adds more overrides for fedora28/arm/glibc
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 30 Jul 2018 14:12:18 +0000 (16:12 +0200)]
[handle] reduce usage of handle_config_mutex to wrap only global lib init
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 30 Jul 2018 04:19:56 +0000 (06:19 +0200)]
[logging] report error in case logging buffer is bigger than PIPE_BUF
See https://github.com/kronosnet/kronosnet/pull/148
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Sun, 29 Jul 2018 04:31:45 +0000 (06:31 +0200)]
[handle] drop init_lock_done as it was used only by locked version of log_msg
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Sun, 29 Jul 2018 04:28:11 +0000 (06:28 +0200)]
[logging] drop locking inside log_msg (part 1)
looking at the code, there are only few calls to log_msg happening outside
of locking context (error reports when failing to grab the lock).
Everything else appears to be safe.
drop the attempt to lock inside log_msg for now, part 2 will address those
few calls that can happen outside of locking context.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Sun, 29 Jul 2018 03:59:20 +0000 (05:59 +0200)]
[handle] drop call to log_msg that would have no effect
logging is not setup yet at this stage and we can't log just yet.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 17 Jul 2018 11:02:08 +0000 (13:02 +0200)]
[tests] ignore nss internal memory leak (3.38+) non recurring
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 17 Jul 2018 04:42:00 +0000 (06:42 +0200)]
[tests] reference correct library in memcheck comments
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 8 Jun 2018 04:59:54 +0000 (06:59 +0200)]
[tests] add another lzma exception
spotted on Debian Experimental, the latest toolchain appears to add
full path to objects and valgrind would generate an error.
add a generic catch-all path exception.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Ferenc Wágner [Tue, 24 Apr 2018 18:10:49 +0000 (20:10 +0200)]
coding style: add parentheses after the sizeof operator
Signed-off-by: Ferenc Wágner <wferi@debian.org>
Ferenc Wágner [Mon, 23 Apr 2018 16:56:34 +0000 (18:56 +0200)]
log_msg: no point in putting NL after the final NUL
Signed-off-by: Ferenc Wágner <wferi@debian.org>
Ferenc Wágner [Mon, 23 Apr 2018 16:18:20 +0000 (18:18 +0200)]
knet_log_msg: fix documentation: the closing newline is added by flush_logs
Signed-off-by: Ferenc Wágner <wferi@debian.org>
Ferenc Wágner [Mon, 23 Apr 2018 16:11:25 +0000 (18:11 +0200)]
_logthread: while loop instead of goto
Signed-off-by: Ferenc Wágner <wferi@debian.org>
Ferenc Wágner [Mon, 23 Apr 2018 16:03:21 +0000 (18:03 +0200)]
_logthread: select() returns the number of set bits, as an int
Signed-off-by: Ferenc Wágner <wferi@debian.org>