On Wed, Oct 29, 2025 at 05:26:20PM +1100, David Gibson wrote:
The fact that outbound forwarding sockets are bound to the loopback address, whereas inbound forwarding sockets are (by default) bound to the unspecified address leads to some unexpected differences between the paths setting up each of them.
An idea for tackling bug 100 suggested a different approach which will also reduce some of those differences and allow more code to be shared between the two paths. I've since discovered that this approach may not help for bug 100, but it might still be worthwhile for the clean up.
Patches 1..6/8 are cleanups which shouldn't change behaviour, and I think are ready to merge. 7/8 is (arguably) a behavioural change, but I've made my case for it in the patch comment. 8/8 needs some further consideration, since I've discovered it does not fix bug 100 as is, I'm including it for advance review, though.
Follow up on 8/8 now I've looked into SO_BINDTODEVICE semantics more clearly. Unfortunately this approach won't work to fix bug 100 [0]. I still think the change is useful for the internals and it may also help with some other bugs such as 113. So, I don't think the code of 8/8 needs to change, but the comments and commit message do. Here's my plan: - I'll wait for review on this draft - If it needs a respin, I'll make those doc changes in the next version - If the series doesn't need a respin, go ahead and apply 1..7, and I'll send a revised 8/8 separately. [0] https://bugs.passt.top/show_bug.cgi?id=100#c8 -- 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