mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cheng Yongkang <teel4res@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [BUG] net: ipvlan: ambiguous external multicast frame is dropped
Date: Thu, 22 Oct 2026 02:17:36 -0700	[thread overview]
Message-ID: <20261022091736.3652981-1-teel4res@gmail.com> (raw)

Hi all,

ipvlan_external_frame() classifies an ingress multicast frame as local
when its Ethernet source equals the shared ipvlan parent/slave MAC and
its L3 source is present in the port-wide address hash.  An external
sender can produce the same tuple.  The frame is then returned with
RX_HANDLER_PASS and is not queued to any L2 ipvlan slave.

Observed on Linux v7.3, commit
08ab31164c55f20c7a2653de3186ae333470e2c1, with two ipvlan L2 slaves
and a veth peer acting as the external sender:

  external ARP broadcast, source MAC == ipvlan MAC,
  sender address configured on a slave:

    parent RX +1
    slave 0 RX +0
    slave 1 RX +0

  identical frame with a different sender MAC:

    parent RX +1
    slave 0 RX +1
    slave 1 RX +1

Packet-socket marker captures agreed with the RX counters.  The frame
is lost only when the ambiguous source tuple is used.

The macvlan sibling documents that source-MAC ambiguity cannot be
resolved and prefers delivery, accepting possible duplicates.  ipvlan
currently chooses the opposite behavior and can cause packet loss.
The same classifier also explains the duplicate direction in candidate
BR-015 when a reflected local frame has an address that is not in the
port hash.

The classifier should use an unambiguous local-origin indication or
make the ambiguity policy consistent with macvlan.  Candidate BR-016 is
canonical because packet loss is the more important symptom.

The self-checking reproducer and complete console log are available on
request.

This was found with a multi-agent workflow; the packet
delivery differential was reproduced in QEMU.

Thanks,
Cheng Yongkang

                 reply	other threads:[~2026-10-22  9:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261022091736.3652981-1-teel4res@gmail.com \
    --to=teel4res@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®