public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: EJ Campbell <ej.campbell@gmail.com>
Cc: passt-dev@passt.top, david@gibson.dropbear.id.au,
	Jon Maloy <jmaloy@redhat.com>
Subject: Re: [PATCH] tap: don't let overheard traffic move addr_seen when serving a fixed address
Date: Fri, 19 Jun 2026 19:05:24 +0200 (CEST)	[thread overview]
Message-ID: <20260619190523.72d6729c@elisabeth> (raw)
In-Reply-To: <20260611042619.3704495-1-ej.campbell@gmail.com>

On Thu, 11 Jun 2026 04:26:19 +0000
EJ Campbell <ej.campbell@gmail.com> wrote:

> Subject: [PATCH v2] tap: don't let overheard traffic move addr_seen when address is explicit
> 
> When pasta's tap interface shares an L2 segment with other endpoints
> (e.g. bridged in a namespace with a VM behind a second tap), frames
> from those endpoints flood to pasta and their source addresses
> overwrite addr_seen — inbound flows are then spliced or forwarded to
> whichever address spoke last instead of the configured guest.
> 
> In such a setup the namespace kernel's own broadcasts (ARP probes,
> IGMP joins, sourced from the bridge address) race the guest's traffic
> for addr_seen, and inbound port-forwarded connections intermittently
> get RST after pasta dials the bridge address, where nothing listens:
> 
>   Flow 0 (TCP connection (spliced)):
>     HOST [127.0.0.1]:57280 -> [127.0.0.2]:22844
>       => SPLICE [0.0.0.0]:0 -> [10.0.2.1]:80    <- bridge addr, not -a  
>   Flow 0 (TCP connection (spliced)): Error event on socket: Connection refused
> 
> When -a / --address is given, the user has explicitly said where the
> guest is: track that decision with a new addr_fixed flag (per address
> family) and skip the addr_seen updates in the tap handlers. Behaviour
> without -a is unchanged, and IPv6 link-local tracking (addr_ll_seen)
> is unaffected — a global -a says nothing about which link-local
> address the guest chose.
> 
> With this change, a reproducer that previously failed one run in three
> (99 spliced connections per run) passed six consecutive runs.
> 
> Signed-off-by: EJ Campbell <ej.campbell@gmail.com>

Applied, thanks for following up, and welcome to the git log!

Jon, this will cause two trivial conflicts with v7 of your multiple
address series (8/13 and 9/13) in tap4_handler() and tap6_handler().

-- 
Stefano


      parent reply	other threads:[~2026-06-19 17:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  1:15 EJ Campbell
2026-06-05 11:57 ` Stefano Brivio
2026-06-09  1:54   ` David Gibson
2026-06-11  4:26     ` EJ Campbell
2026-06-19  4:39       ` David Gibson
2026-06-19 10:43         ` Stefano Brivio
2026-06-19 17:05       ` Stefano Brivio [this message]

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=20260619190523.72d6729c@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ej.campbell@gmail.com \
    --cc=jmaloy@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).