!12 fix epoll event size to scope with extra event on send to link

From: @wang--ge 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2022-11-15 07:29:24 +00:00 committed by Gitee
commit 3a6a083afa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 26734825de99f514827ee863592cf04fe2fc9231 Mon Sep 17 00:00:00 2001
From: Fabio M.Di Nitto <fdinitto@redhat.com>
Date: Tue, 22 Mar 2022 15:40:42 +0100
Subject: [PATCH] [tx] fix epoll event size to scope with extra event on send to link
Reference: https://github.com/kronosnet/kronosnet/pull/377/commits
---
libknet/threads_tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libknet/threads_tx.c b/libknet/threads_tx.c
index 1d954d6..3f43037 100644
--- a/libknet/threads_tx.c
+++ b/libknet/threads_tx.c
@@ -676,7 +676,7 @@ static void _handle_send_to_links(knet_handle_t knet_h, struct msghdr *msg, int
void *_handle_send_to_links_thread(void *data)
{
knet_handle_t knet_h = (knet_handle_t) data;
- struct epoll_event events[KNET_EPOLL_MAX_EVENTS];
+ struct epoll_event events[KNET_EPOLL_MAX_EVENTS + 1];
int i, nev, type;
int flush, flush_queue_limit;
int8_t channel;
--
2.27.0

View File

@ -20,7 +20,7 @@
Name: kronosnet
Summary: Multipoint-to-Multipoint VPN daemon
Version: 1.13
Release: 3
Release: 4
License: GPLv2+ and LGPLv2+
URL: https://kronosnet.org
Source0: https://kronosnet.org/releases/%{name}-%{version}.tar.xz
@ -66,6 +66,7 @@ BuildRequires: autoconf automake libtool
%endif
Patch0001: backport-kronosnet-fix-format-truncation.patch
Patch0002: fix-epoll-event-size-to-scope-with-extra-event-on-send-to-link.patch
%prep
%autosetup -n kronosnet-%{version} -p1
@ -436,6 +437,9 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%endif
%changelog
* Tue Nov 15 2022 Ge Wang <wangge20@h-partners.com> - 1.13-4
- fix epoll event size to scope with extra event on send to link
* Wed Aug 04 2021 Liu Yinsi <liuyinsi@163.com> - 1.13-3
- fix format-truncation to support gcc 10