diff --git a/0081-check-return-value-from-adding-interface.patch b/0081-check-return-value-from-adding-interface.patch new file mode 100644 index 0000000000000000000000000000000000000000..b21cbca19494970c6d4c5aef00276dde00a2f683 --- /dev/null +++ b/0081-check-return-value-from-adding-interface.patch @@ -0,0 +1,36 @@ +From c79900e31e3e5a16c7f5410d0800315a0491ccad Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger +Date: Sun, 27 Oct 2024 14:34:31 +0800 +Subject: app/dumpcap: check return value from adding interface + +The rte_pcapng_add_interface could fail. +For example: running out of space for the file. + +Signed-off-by: Stephen Hemminger +Acked-by: Morten Brørup +Acked-by: Chengwen Feng +--- + app/dumpcap/main.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c +index fc28e2d..4443a6c 100644 +--- a/app/dumpcap/main.c ++++ b/app/dumpcap/main.c +@@ -764,9 +764,10 @@ static dumpcap_out_t create_output(void) + free(os); + + TAILQ_FOREACH(intf, &interfaces, next) { +- rte_pcapng_add_interface(ret.pcapng, intf->port, +- intf->ifname, intf->ifdescr, +- intf->opts.filter); ++ if (rte_pcapng_add_interface(ret.pcapng, intf->port, intf->ifname, ++ intf->ifdescr, intf->opts.filter) < 0) ++ rte_exit(EXIT_FAILURE, "rte_pcapng_add_interface %u failed\n", ++ intf->port); + } + } else { + pcap_t *pcap; +-- +2.25.1 + diff --git a/dpdk.spec b/dpdk.spec index 9c837d32fb9970ea25da98ba032c1f0badb75612..855b698cda84ccc27b3297afcecae8a0ca9042de 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -11,7 +11,7 @@ Name: dpdk Version: 23.11 -Release: 29 +Release: 30 URL: http://dpdk.org Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz @@ -109,6 +109,7 @@ Patch9077: 0077-config-arm-adapt-RTE_MAX_LCORE-to-640.patch Patch1078: 0078-dpdk-add-sw_64-support.patch Patch6079: 0079-net-xsc-add-xsc-PMD.patch +Patch6080: 0081-check-return-value-from-adding-interface.patch BuildRequires: meson @@ -314,6 +315,9 @@ fi /usr/sbin/depmod %changelog +* Mon Mar 31 2025 wangjiawei - 23.11-30 +- Sync patch from upstreaming: app/dumpcap: check return value from adding interface + * Fri Mar 14 2025 qianrong - 23.11-29 - add xsc PMD