From: Stephen Hemminger <stephen@networkplumber.org>
To: Tianli Lai <laitianli@tom.com>
Cc: dev@dpdk.org, Reshma Pattan <reshma.pattan@intel.com>
Subject: Re: [PATCH] app/dumpcap:fix coredump problem because pcap_dump 3th argument is null
Date: Thu, 29 Feb 2024 19:36:14 -0800 [thread overview]
Message-ID: <20240229193614.656e7607@hermes.local> (raw)
In-Reply-To: <20240301104129.3725-1-laitianli@tom.com>
On Fri, 1 Mar 2024 18:41:29 +0800
Tianli Lai <laitianli@tom.com> wrote:
> if rte_pktmbuf_read() return NULL, pcap_dump() would coredump.
>
> Signed-off-by: Tianli Lai <laitianli@tom.com>
Ok, but how is this possible.
header.caplen will be min of (pktlen, 2048)
So in rte_pktmbuf_read()
if (likely (0 + pktlen <= rte_pktmbuf_data_len(m))
return rte_pktmbuf_mtod_offset(m, char *, 0);
Maybe the packet is really big and the packet is multi-segment.
But in that case the code rte_pktmbuf_read should do the consoliation.
Are you sure driver is not generating weird packets?
next prev parent reply other threads:[~2024-03-01 3:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 10:41 [PATCH] app/dumpcap:fix coredump problem because pcap_dump 3th argument is null Tianli Lai
2024-03-01 3:36 ` Stephen Hemminger [this message]
2024-10-03 22:09 ` [PATCH] app/dumpcap: fix handling of jumbo frames Stephen Hemminger
2024-10-11 12:46 ` David Marchand
2024-10-11 14:30 ` [PATCH] app/dumpcap:fix coredump problem because pcap_dump 3th argument is null Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240229193614.656e7607@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=laitianli@tom.com \
--cc=reshma.pattan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.