patch 'pcapng: fix variable shadowing' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Tue Mar 31 08:23:37 CEST 2026
Hi,
FYI, your patch has been queued to stable release 23.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/05/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/shanipr/dpdk-stable
This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/47715c92e1044be7af0e182737f43b7640857ece
Thanks.
Shani
---
>From 47715c92e1044be7af0e182737f43b7640857ece 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 16485b27cb..f0ca7be76a 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -294,16 +294,15 @@ rte_pcapng_add_interface(rte_pcapng_t *self, uint16_t port,
opt = pcapng_add_option(opt, PCAPNG_IFB_HARDWARE,
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));
}
opt = pcapng_add_option(opt, PCAPNG_OPT_END, NULL, 0);
--
2.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-31 00:32:31.113026623 +0300
+++ 0018-pcapng-fix-variable-shadowing.patch 2026-03-31 00:32:28.604271000 +0300
@@ -1 +1 @@
-From f6323a2561b673665550fe3696702ee815ae0f11 Mon Sep 17 00:00:00 2001
+From 47715c92e1044be7af0e182737f43b7640857ece Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6323a2561b673665550fe3696702ee815ae0f11 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 21bc94cea1..2cc9e2040d 100644
+index 16485b27cb..f0ca7be76a 100644
@@ -22 +23 @@
-@@ -296,16 +296,15 @@ rte_pcapng_add_interface(rte_pcapng_t *self, uint16_t port, uint16_t link_type,
+@@ -294,16 +294,15 @@ rte_pcapng_add_interface(rte_pcapng_t *self, uint16_t port,
More information about the stable
mailing list