[PATCH 22.11] pcapng: fix handling of chained mbufs
Luca Boccassi
luca.boccassi at gmail.com
Mon Oct 28 17:59:22 CET 2024
On Mon, 28 Oct 2024 at 14:03, Oleksandr Nahnybida
<oleksandrn at interfacemasters.com> wrote:
>
> [ upstream commit 6db358536fee7891b5cb670df94ec87543ddd0fb ]
>
> The pcapng generates corrupted files when dealing with chained mbufs.
> This issue arises because in rte_pcapng_copy the length of the EPB block
> is incorrectly calculated using the data_len of the first mbuf instead
> of the pkt_len, despite that rte_pcapng_write_packets correctly writing
> the mbuf chain to disk.
>
> This fix ensures that the block length is calculated based on the pkt_len,
> aligning it with the actual data written to disk.
>
> Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")
>
> Signed-off-by: Oleksandr Nahnybida <oleksandrn at interfacemasters.com>
> ---
> app/test/test_pcapng.c | 10 +++++++++-
> lib/pcapng/rte_pcapng.c | 12 ++++++------
> 2 files changed, 15 insertions(+), 7 deletions(-)
Thanks, applied
More information about the stable
mailing list