!419 [sync] PR-409: pdump: fix pcap_dump coredump caused by incorrect pkt_len
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
c4258271f0
@ -0,0 +1,32 @@
|
||||
From c02e48b92050856389403518be8bb70a4fdda551 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng12 <jiangheng14@huawei.com>
|
||||
Date: Thu, 8 Jun 2023 20:59:15 +0800
|
||||
Subject: [PATCH] pdump: fix pcap_dump coredump caused by incorrect pkt_len
|
||||
|
||||
---
|
||||
drivers/net/pcap/pcap_ethdev.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
|
||||
index ec29fd6..40ad166 100644
|
||||
--- a/drivers/net/pcap/pcap_ethdev.c
|
||||
+++ b/drivers/net/pcap/pcap_ethdev.c
|
||||
@@ -408,8 +408,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, caplen, temp_data));
|
||||
+ const void *sp = rte_pktmbuf_read(mbuf, 0, caplen, temp_data);
|
||||
+ if (sp == NULL) {
|
||||
+ rte_pktmbuf_free(mbuf);
|
||||
+ continue;
|
||||
+ } else {
|
||||
+ pcap_dump((u_char *)dumper, &header, sp);
|
||||
+ }
|
||||
|
||||
num_tx++;
|
||||
tx_bytes += caplen;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
15
dpdk.spec
15
dpdk.spec
@ -1,6 +1,6 @@
|
||||
Name: dpdk
|
||||
Version: 21.11
|
||||
Release: 48
|
||||
Release: 49
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%global source_version 21.11
|
||||
@ -330,10 +330,12 @@ Patch6306: 0306-net-hns3-fix-device-start-return-value.patch
|
||||
Patch6307: 0307-net-hns3-fix-uninitialized-variable.patch
|
||||
Patch6308: 0308-net-hns3-refactor-code.patch
|
||||
Patch6309: 0309-net-hns3-fix-inaccurate-log.patch
|
||||
Patch9310: 0310-net-hns3-fix-redundant-line-break-in-log.patch
|
||||
Patch9311: 0311-ethdev-add-API-to-check-if-queue-is-valid.patch
|
||||
Patch9312: 0312-app-testpmd-fix-segment-fault-with-invalid-queue-ID.patch
|
||||
Patch9313: 0313-net-hns3-fix-IMP-reset-trigger.patch
|
||||
Patch6310: 0310-net-hns3-fix-redundant-line-break-in-log.patch
|
||||
Patch6311: 0311-ethdev-add-API-to-check-if-queue-is-valid.patch
|
||||
Patch6312: 0312-app-testpmd-fix-segment-fault-with-invalid-queue-ID.patch
|
||||
Patch6313: 0313-net-hns3-fix-IMP-reset-trigger.patch
|
||||
|
||||
Patch9020: 0020-pdump-fix-pcap_dump-coredump-caused-by-incorrect-pkt_len.patch
|
||||
|
||||
Summary: Data Plane Development Kit core
|
||||
Group: System Environment/Libraries
|
||||
@ -478,6 +480,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
|
||||
/usr/sbin/depmod
|
||||
|
||||
%changelog
|
||||
* Tue Jun 13 2023 jiangheng <jiangheng14@huawei.com> - 21.11-49
|
||||
- pdump: fix pcap_dump coredump caused by incorrect pkt_len
|
||||
|
||||
* Fir Jun 09 2023 jiangheng <jiangheng14@huawei.com> - 21.11-48
|
||||
- distinguish self and upstream patches number
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user