diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-01-30 16:58:11 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-01-31 04:25:08 +0100 |
| commit | af7b81b5408da8c56bb22dd11679f2b4024a45c8 (patch) | |
| tree | bb3d9145a1a1cb37e4f36cebe68386e282d97059 /test/lib/git:/passt.top/passt | |
| parent | 768baf42f1485a7f7c867c8eb3a7e5ddcddb9d86 (diff) | |
| download | passt-master.tar passt-master.tar.gz passt-master.tar.bz2 passt-master.tar.lz passt-master.tar.xz passt-master.tar.zst passt-master.zip | |
On incoming migrations we need to bind() reconstructed sockets to their
correct local address. We can't do this if the origin passt instance is
in the same namespace and still has those addresses bound. Arguably that's
a bug in bind()s operation during repair mode, but for now we have to work
around it.
So, to allow local-to-local migrations we close() sockets on the outgoing
side as we process them. In addition to closing the connected socket we
also have to close the associated listen()ing socket, because that can also
cause an address conflict.
To do that, we introduced the listening_sock field in the connection
state, because we had no other way to find the right listening sockets.
Now that we have the forwarding table, we have a complete list of
listening sockets elsewhere. We can use that instead, to close all
listening sockets on outbound migration, rather than just the ones that
might conflict.
This is cleaner and, importantly, saves a valuable 32-bits in the flow
state structure. It does mean that there is a longer window where a peer
attempting to connect during migration might get a Connection Refused.
I think this is an acceptable trade-off for now: arguably we should not
allow local-to-local migrations in any case, since the socket closes make
it impossible to safely roll back migration as per the qemu model.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[sbrivio: Adjust comment to tcp_flow_migrate_source()]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/git:/passt.top/passt')
0 files changed, 0 insertions, 0 deletions
