已开启
app/dumpcap: check return value from adding interface #716
AtomGit-Bot创建于 2025年3月31日
app/dumpcap: check return value from adding interface #716
已开启
AtomGit-Bot创建于 2025年3月31日
从refs/pull/716/head合入到openEuler-25.03
共 2 个文件变更+41-1
@@ -0,0 +1,36 @@
1+From c79900e31e3e5a16c7f5410d0800315a0491ccad Mon Sep 17 00:00:00 2001
2+From: Stephen Hemminger <stephen@networkplumber.org>
3+Date: Sun, 27 Oct 2024 14:34:31 +0800
4+Subject: app/dumpcap: check return value from adding interface
5+ 
6+The rte_pcapng_add_interface could fail.
7+For example: running out of space for the file.
8+ 
9+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
10+Acked-by: Morten Brørup <mb@smartsharesystems.com>
11+Acked-by: Chengwen Feng <fengchengwen@huawei.com>
12+---
13+ app/dumpcap/main.c | 7 ++++---
14+ 1 file changed, 4 insertions(+), 3 deletions(-)
15+ 
16+diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
17+index fc28e2d..4443a6c 100644
18+--- a/app/dumpcap/main.c
19++++ b/app/dumpcap/main.c
20+@@ -764,9 +764,10 @@ static dumpcap_out_t create_output(void)
21+ free(os);
22+
23+ TAILQ_FOREACH(intf, &interfaces, next) {
24+- rte_pcapng_add_interface(ret.pcapng, intf->port,
25+- intf->ifname, intf->ifdescr,
26+- intf->opts.filter);
27++ if (rte_pcapng_add_interface(ret.pcapng, intf->port, intf->ifname,
28++ intf->ifdescr, intf->opts.filter) < 0)
29++ rte_exit(EXIT_FAILURE, "rte_pcapng_add_interface %u failed\n",
30++ intf->port);
31+ }
32+ } else {
33+ pcap_t *pcap;
34+--
35+2.25.1
36+ 
@@ -11,7 +11,7 @@
11 11 
12Name: dpdk12Name: dpdk
13Version: 23.1113Version: 23.11
14-Release: 2914+Release: 30
15URL: http://dpdk.org15URL: http://dpdk.org
16Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz16Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz
17 17 
@@ -109,6 +109,7 @@ Patch9077: 0077-config-arm-adapt-RTE_MAX_LCORE-to-640.patch
109Patch1078: 0078-dpdk-add-sw_64-support.patch109Patch1078: 0078-dpdk-add-sw_64-support.patch
110 110 
111Patch6079: 0079-net-xsc-add-xsc-PMD.patch111Patch6079: 0079-net-xsc-add-xsc-PMD.patch
112+Patch6080: 0081-check-return-value-from-adding-interface.patch
112 113 
113 114 
114BuildRequires: meson115BuildRequires: meson
@@ -314,6 +315,9 @@ fi
314/usr/sbin/depmod315/usr/sbin/depmod
315 316 
316%changelog317%changelog
318+* Mon Mar 31 2025 wangjiawei <wangjiawei@kylinos.cn> - 23.11-30
319+- Sync patch from upstreaming: app/dumpcap: check return value from adding interface
320+ 
317* Fri Mar 14 2025 qianrong <qianr@yunsilicon.com> - 23.11-29321* Fri Mar 14 2025 qianrong <qianr@yunsilicon.com> - 23.11-29
318- add xsc PMD322- add xsc PMD
319 323