diff --git a/0001-pdump-fix-pcap_dump-coredump-caused-by-incorrect-pkt_len.patch b/0001-pdump-fix-pcap_dump-coredump-caused-by-incorrect-pkt_len.patch new file mode 100644 index 0000000000000000000000000000000000000000..8db887c80166ca69f75a915588e027f7b957b6f2 --- /dev/null +++ b/0001-pdump-fix-pcap_dump-coredump-caused-by-incorrect-pkt_len.patch @@ -0,0 +1,32 @@ +From 28be6f7f94f85dd15e1807abb6d14a1164b4396d Mon Sep 17 00:00:00 2001 +From: jiangheng12 +Date: Sat, 17 Jun 2023 20:29:39 +0800 +Subject: [PATCH] pdump: fix pcap_dump coredump caused by incorrect pkt_len + +--- + drivers/net/pcap/rte_eth_pcap.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c +index aa7ef6f..18b2f30 100644 +--- a/drivers/net/pcap/rte_eth_pcap.c ++++ b/drivers/net/pcap/rte_eth_pcap.c +@@ -342,8 +342,13 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) + * in the mbuf (when the mbuf is contiguous) or, otherwise, + * a pointer to temp_data after copying into it. + */ +- pcap_dump((u_char *)dumper, &header, +- rte_pktmbuf_read(mbuf, 0, len, temp_data)); ++ const void *sp = rte_pktmbuf_read(mbuf, 0, len, temp_data); ++ if (sp == NULL) { ++ rte_pktmbuf_free(mbuf); ++ continue; ++ } else { ++ pcap_dump((u_char *)dumper, &header, sp); ++ } + + num_tx++; + tx_bytes += len; +-- +2.23.0 + diff --git a/dpdk.spec b/dpdk.spec index e30bea75fe632ef2866813cc457209d888334ec6..d0c32db3d3623a54af7778e94aa5b60904bcf0a5 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 19.11 -Release: 28 +Release: 29 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 19.11 @@ -64,6 +64,8 @@ Patch9000: hinic-free-mbuf-use-rte_pktmbuf_free_seg.patch Patch6014: backport-fix-dedicated-queue-mode-in-vector-burst.patch +Patch9001: 0001-pdump-fix-pcap_dump-coredump-caused-by-incorrect-pkt_len.patch + Summary: Data Plane Development Kit core Group: System Environment/Libraries License: BSD and LGPLv2 and GPLv2 @@ -232,6 +234,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko /usr/sbin/depmod %changelog +* Sat Jun 17 2023 jiangheng - 19.11-29 +- pdump: fix pcap_dump coredump caused by incorrect pkt_len + * Tue May 16 2023 zhujunhao - 19.11-28 - fix bond connect failed