From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 1/5] fwd: Clarify semantics of --host-lo-to-ns-lo
Date: Thu, 16 Jul 2026 13:31:13 +1000 [thread overview]
Message-ID: <alhQcfTsDrC6Zo8m@zatzit> (raw)
In-Reply-To: <20260715091129.282bbbf9@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
On Wed, Jul 15, 2026 at 09:11:30AM +0200, Stefano Brivio wrote:
> On Mon, 13 Jul 2026 15:38:52 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > The semantics of --host-lo-to-ns-lo as described in the man page don't
> > quite make sense: It says without the option forwarded packets will appear
> > to come _from_ the guest's public address, which is not usually true.
> > Instead the packets will arrive *to* the guest's public address. The exact
> > semantics are also a bit confusing in general.
> >
> > Rewrite both the man page and code to clarify this. The new rule is that
> > it redirects connections addressed to a host loopback address to the same
> > loopback address in the guest. This is notionally different from what we
> > had in two ways:
> > * We can now deliver to nonstandard loopback addresses within the guest,
> > not just the default one. This is technically a behavioural change,
> > but I think will be less surprising behaviour.
> > * The decision is now made on the original _destination_ address, rather
> > than source address. That's different theoretically, but not in
> > practice, since loopback packets must have loopback addresses for both
> > source and destination.
> >
> > We make it explicitly incompatible with --no-splice - previously it
> > was allowed, but would have no effect in that case.
> >
> > As well as being more precise right now, these semantics will intersect
> > better with other upcoming changes to the forwarding logic.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>
> I added:
>
> Link: https://bugs.passt.top/show_bug.cgi?id=212
Thanks. Having fixed the bug before it was reported, I chose not to
strain my powers of precognition by also predicting the bug number :).
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-07-16 4:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 5:38 [PATCH v2 0/5] Fix bug 209 David Gibson
2026-07-13 5:38 ` [PATCH v2 1/5] fwd: Clarify semantics of --host-lo-to-ns-lo David Gibson
2026-07-15 7:11 ` Stefano Brivio
2026-07-16 3:31 ` David Gibson [this message]
2026-07-13 5:38 ` [PATCH v2 2/5] udp: Validate that we have a unicast source address David Gibson
2026-07-13 5:38 ` [PATCH v2 3/5] fwd: Rework default address logic for inbound flows David Gibson
2026-07-13 5:38 ` [PATCH v2 4/5] fwd: Reorder DNAPT and SNAT steps in fwd_nat_from_host() David Gibson
2026-07-13 5:38 ` [PATCH v2 5/5] fwd: Don't rewrite inbound multicast destinations David Gibson
2026-07-15 7:11 ` [PATCH v2 0/5] Fix bug 209 Stefano Brivio
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=alhQcfTsDrC6Zo8m@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@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.
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).