On Mon, 13 Jul 2026 15:38:52 +1000
David Gibson
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
I added: Link: https://bugs.passt.top/show_bug.cgi?id=212 -- Stefano