[PATCH v2 6/6] app/dumpcap: disable capture on the interface that failed
Stephen Hemminger
stephen at networkplumber.org
Fri Nov 27 22:07:08 CET 2026
The unwind after a failed enable stopped at the interface that
failed, so callbacks installed before the failure kept referencing
the ring after dumpcap freed it.
Disable that interface as well. Promiscuous mode is left alone
since it is only set after a successful enable.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Cc: stable at dpdk.org
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/dumpcap/main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 47483535fc..5ae85cbdb2 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -852,12 +852,16 @@ static void enable_pdump(struct rte_ring *r, struct rte_mempool *mp)
if (ret < 0) {
const struct interface *intf2;
- /* unwind any previous enables */
+ /*
+ * Unwind this interface too, enable can fail after
+ * installing some callbacks. Promiscuous mode is
+ * not set on it yet.
+ */
TAILQ_FOREACH(intf2, &interfaces, next) {
- if (intf == intf2)
- break;
rte_pdump_disable(intf2->port,
RTE_PDUMP_ALL_QUEUES, RTE_PDUMP_FLAG_RXTX);
+ if (intf2 == intf)
+ break;
if (intf2->opts.promisc_mode)
rte_eth_promiscuous_disable(intf2->port);
}
--
2.53.0
More information about the stable
mailing list