import kronosnet-1.24-2.el9
This commit is contained in:
parent
c02379b03e
commit
99733cdb8d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/kronosnet-1.22.tar.xz
|
||||
SOURCES/kronosnet-1.24.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
9e89dc037ead2591de47e871903ea6c9c4258679 SOURCES/kronosnet-1.22.tar.xz
|
||||
1a3bb04c2f082076fea97d5582676addde84336d SOURCES/kronosnet-1.24.tar.xz
|
||||
|
13
SOURCES/1_24.testfix.patch
Normal file
13
SOURCES/1_24.testfix.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/libknet/tests/api_knet_handle_new.c b/libknet/tests/api_knet_handle_new.c
|
||||
index a6ccb3a..60e5c4f 100644
|
||||
--- a/libknet/tests/api_knet_handle_new.c
|
||||
+++ b/libknet/tests/api_knet_handle_new.c
|
||||
@@ -112,7 +112,7 @@ static void test(void)
|
||||
|
||||
printf("Test knet_handle_new hostid 1, proper log_fd, proper log level (DEBUG)\n");
|
||||
|
||||
- knet_h1 = knet_handle_start(logfds, KNET_LOG_DEBUG, knet_h);
|
||||
+ (void)knet_handle_start(logfds, KNET_LOG_DEBUG, knet_h);
|
||||
CLEAN_EXIT(CONTINUE);
|
||||
}
|
||||
|
@ -1,82 +0,0 @@
|
||||
commit 28ddb87a2f4562c5d1752a778744cc56136f81c1
|
||||
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Sun Nov 7 17:02:05 2021 +0100
|
||||
|
||||
[udp] use ICMP error messages to trigger faster link down detection
|
||||
|
||||
this solves a possible race condition when:
|
||||
|
||||
- node1 is running
|
||||
- node2 very fast
|
||||
- node1 does NOT have enough time to detect that node2 has gone
|
||||
and reset the local seq numbers / buffers
|
||||
- node1 will start rejecting valid packets from node2
|
||||
|
||||
There is still a potential minor race condition where app
|
||||
can restart so fast that kernel / network don't have time
|
||||
to generate an ICMP error. This will be addressed using
|
||||
instance id in onwire v2 protocol, as suggested by Jan F.
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
|
||||
diff --git a/libknet/transport_udp.c b/libknet/transport_udp.c
|
||||
index 963340d..32dd032 100644
|
||||
--- a/libknet/transport_udp.c
|
||||
+++ b/libknet/transport_udp.c
|
||||
@@ -364,6 +364,46 @@ static int read_errs_from_sock(knet_handle_t knet_h, int sockfd)
|
||||
log_debug(knet_h, KNET_SUB_TRANSP_UDP, "Received ICMP error from %s: %s destination unknown", addr_str, strerror(sock_err->ee_errno));
|
||||
} else {
|
||||
log_debug(knet_h, KNET_SUB_TRANSP_UDP, "Received ICMP error from %s: %s %s", addr_str, strerror(sock_err->ee_errno), addr_remote_str);
|
||||
+ if ((sock_err->ee_errno == ECONNREFUSED) || /* knet is not running on the other node */
|
||||
+ (sock_err->ee_errno == ECONNABORTED) || /* local kernel closed the socket */
|
||||
+ (sock_err->ee_errno == ENONET) || /* network does not exist */
|
||||
+ (sock_err->ee_errno == ENETUNREACH) || /* network unreachable */
|
||||
+ (sock_err->ee_errno == EHOSTUNREACH) || /* host unreachable */
|
||||
+ (sock_err->ee_errno == EHOSTDOWN) || /* host down (from kernel/net/ipv4/icmp.c */
|
||||
+ (sock_err->ee_errno == ENETDOWN)) { /* network down */
|
||||
+ struct knet_host *host = NULL;
|
||||
+ struct knet_link *kn_link = NULL;
|
||||
+ int link_idx, found = 0;
|
||||
+
|
||||
+ for (host = knet_h->host_head; host != NULL; host = host->next) {
|
||||
+ for (link_idx = 0; link_idx < KNET_MAX_LINK; link_idx++) {
|
||||
+ kn_link = &host->link[link_idx];
|
||||
+ if (kn_link->outsock == sockfd) {
|
||||
+ if (!cmpaddr(&remote, &kn_link->dst_addr)) {
|
||||
+ found = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (found) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ((host) && (kn_link) &&
|
||||
+ (kn_link->status.connected)) {
|
||||
+ log_debug(knet_h, KNET_SUB_TRANSP_UDP, "Setting down host %u link %i", host->host_id, kn_link->link_id);
|
||||
+ /*
|
||||
+ * setting transport_connected = 0 will trigger
|
||||
+ * thread_heartbeat link_down process.
|
||||
+ *
|
||||
+ * the process terminates calling into transport_link_down
|
||||
+ * below that will set transport_connected = 1
|
||||
+ */
|
||||
+ kn_link->transport_connected = 0;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -436,5 +476,9 @@ int udp_transport_link_dyn_connect(knet_handle_t knet_h, int sockfd, struct knet
|
||||
|
||||
int udp_transport_link_is_down(knet_handle_t knet_h, struct knet_link *kn_link)
|
||||
{
|
||||
+ /*
|
||||
+ * see comments about handling ICMP error messages
|
||||
+ */
|
||||
+ kn_link->transport_connected = 1;
|
||||
return 0;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
commit 62271c5c0b08041b24930310c04e3933720917c6
|
||||
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Mon Nov 8 09:14:22 2021 +0100
|
||||
|
||||
[host] fix dst_seq_num initialization race condition
|
||||
|
||||
There is a potential race condition where the sender
|
||||
is overloaded, sending data packets before pings
|
||||
can kick in and set the correct dst_seq_num.
|
||||
|
||||
if this node is starting up (dst_seq_num = 0),
|
||||
it can start rejecing valid packets and get stuck.
|
||||
|
||||
Set the dst_seq_num to the first seen packet and
|
||||
use that as reference instead.
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
|
||||
diff --git a/libknet/host.c b/libknet/host.c
|
||||
index f02ef02..54061fd 100644
|
||||
--- a/libknet/host.c
|
||||
+++ b/libknet/host.c
|
||||
@@ -573,6 +573,21 @@ int _seq_num_lookup(knet_handle_t knet_h, struct knet_host *host, seq_num_t seq_
|
||||
char *dst_cbuf_defrag = host->circular_buffer_defrag;
|
||||
seq_num_t *dst_seq_num = &host->rx_seq_num;
|
||||
|
||||
+ /*
|
||||
+ * There is a potential race condition where the sender
|
||||
+ * is overloaded, sending data packets before pings
|
||||
+ * can kick in and set the correct dst_seq_num.
|
||||
+ *
|
||||
+ * if this node is starting up (dst_seq_num = 0),
|
||||
+ * it can start rejecing valid packets and get stuck.
|
||||
+ *
|
||||
+ * Set the dst_seq_num to the first seen packet and
|
||||
+ * use that as reference instead.
|
||||
+ */
|
||||
+ if (!*dst_seq_num) {
|
||||
+ *dst_seq_num = seq_num;
|
||||
+ }
|
||||
+
|
||||
if (clear_buf) {
|
||||
_clear_cbuffers(host, seq_num);
|
||||
}
|
@ -36,14 +36,13 @@
|
||||
|
||||
Name: kronosnet
|
||||
Summary: Multipoint-to-Multipoint VPN daemon
|
||||
Version: 1.22
|
||||
Release: 4%{?dist}
|
||||
Version: 1.24
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://kronosnet.org
|
||||
Source0: https://kronosnet.org/releases/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch0: bz2112923-icmp-faster-link-down-detection.patch
|
||||
Patch1: bz212923-fix-dst_seq_num_init-race.patch
|
||||
Patch0: 1_24.testfix.patch
|
||||
|
||||
# Build dependencies
|
||||
BuildRequires: make
|
||||
@ -88,10 +87,7 @@ BuildRequires: autoconf automake libtool
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1 -b bz2112923-icmp-faster-link-down-detection
|
||||
%patch1 -p1 -b bz212923-fix-dst_seq_num_init-race
|
||||
|
||||
#%patch0 -p1 -b .bz1954551-enable-stack-clash-protection
|
||||
%patch0 -p1 -b .1_24.testfix
|
||||
|
||||
%build
|
||||
%if %{with runautogen}
|
||||
@ -443,9 +439,13 @@ Requires: libknet1%{_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Aug 03 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.22-4
|
||||
- Fix "node randomly not rejoining cluster after a pcs cluster stop/start"
|
||||
Resolves: rhbz#2112923
|
||||
* Fri Jul 15 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.24-2
|
||||
- Fix libnozzle tests failing & covscan warning on api_knet_handle_new test
|
||||
Resolves: rhbz#2024090
|
||||
|
||||
* Fri Jul 15 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.24-1
|
||||
- Rebase to 1.24
|
||||
Resolves: rhbz#2024090
|
||||
|
||||
* Wed Oct 06 2021 Christine Caulfield <ccaulfie@redhat.com> - 1.22-3
|
||||
- Add back the test suite that got lost in the pull from Fedora
|
||||
|
Loading…
Reference in New Issue
Block a user