From: David Ahern <dsahern@kernel.org>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
andrea.mayer@uniroma2.it, stesasso@gmail.com
Subject: Re: [PATCH net] vrf: Stop corrupting skb->csum when capturing CHECKSUM_COMPLETE packets
Date: Tue, 22 Sep 2026 07:55:17 -0600 [thread overview]
Message-ID: <71792738-39d6-4375-9d47-bc4944727ed8@kernel.org> (raw)
In-Reply-To: <20260922131239.2509494-1-idosch@nvidia.com>
On 9/22/26 7:12 AM, Ido Schimmel wrote:
> The VRF device is an Ethernet device but it can have non-Ethernet ports
> such as IP tunnels. Before the cited commit, capturing packets from such
> ports on the VRF device resulted in these packets being detected as
> malformed since they lack an Ethernet header.
>
> The cited commit fixed it by pushing a dummy Ethernet header to such
> packets before the capture and pulling it afterwards. In the case of
> CHECKSUM_COMPLETE packets it also updated skb->csum with the checksum of
> the dummy Ethernet header. This is wrong as skb->csum should not include
> the checksum of the Ethernet header ("checksum of the _whole_ packet as
> seen by netif_rx()").
>
> This also means that L4 protocols receive a corrupted skb->csum and
> potentially drop the packet, as is the case with UDP packets whose
> checksum was completed by software.
>
> Fix by removing the unnecessary call to skb_postpush_rcsum().
>
> Fixes: 048939088220 ("vrf: add mac header for tunneled packets when sniffer is attached")
> Reported-by: Stefano Sasso <stesasso@gmail.com>
> Closes: https://lore.kernel.org/netdev/CALtE316UtL3x7LL6uxfXzx8rW6AbzYPeDOb478hqJCr_-dj=Wg@mail.gmail.com/
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> drivers/net/vrf.c | 2 --
> 1 file changed, 2 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
Thanks, Ido.
next prev parent reply other threads:[~2026-09-22 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 13:12 [PATCH net] vrf: Stop corrupting skb->csum when capturing CHECKSUM_COMPLETE packets Ido Schimmel
2026-09-22 13:55 ` David Ahern [this message]
2026-09-22 14:23 ` Eric Dumazet
2026-09-23 19:16 ` Andrea Mayer
2026-09-24 1:40 ` patchwork-bot+netdevbpf
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=71792738-39d6-4375-9d47-bc4944727ed8@kernel.org \
--to=dsahern@kernel.org \
--cc=andrea.mayer@uniroma2.it \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stesasso@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox