patch 'pcapng: fix variable shadowing' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:08:13 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/10a44e8b8d38e95e127e70b090161718e4e92a1e
Thanks.
Kevin
---
>From 10a44e8b8d38e95e127e70b090161718e4e92a1e Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 14 Jan 2026 15:44:23 +0000
Subject: [PATCH] pcapng: fix variable shadowing
[ upstream commit f6323a2561b673665550fe3696702ee815ae0f11 ]
The "len" variable is shadowed within a function, so rename inner use to
the more descriptive "filter_len" to fix the issue.
Fixes: d1da6d0d04c7 ("pcapng: require per-interface information")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/pcapng/rte_pcapng.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 21bc94cea1..2cc9e2040d 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -297,14 +297,13 @@ rte_pcapng_add_interface(rte_pcapng_t *self, uint16_t port, uint16_t link_type,
ifhw, strlen(ifhw));
if (filter) {
- size_t len;
+ const size_t filter_len = strlen(filter) + 1;
- len = strlen(filter) + 1;
opt->code = PCAPNG_IFB_FILTER;
- opt->length = len;
+ opt->length = filter_len;
/* Encoding is that the first octet indicates string vs BPF */
opt->data[0] = 0;
memcpy(opt->data + 1, filter, strlen(filter));
- opt = (struct pcapng_option *)((uint8_t *)opt + pcapng_optlen(len));
+ opt = (struct pcapng_option *)((uint8_t *)opt + pcapng_optlen(filter_len));
}
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:47.606950801 +0000
+++ 0011-pcapng-fix-variable-shadowing.patch 2026-02-26 10:16:46.890474270 +0000
@@ -1 +1 @@
-From f6323a2561b673665550fe3696702ee815ae0f11 Mon Sep 17 00:00:00 2001
+From 10a44e8b8d38e95e127e70b090161718e4e92a1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6323a2561b673665550fe3696702ee815ae0f11 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list