aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-04-02 14:13:19 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-04-02 08:29:01 +0200
commitdec3d73e1e8e007d05f9dce9a48aca7cb8532992 (patch)
tree7112344e5f8286ab30eab0c517bf201bb2181c43 /contrib/qemu
parent6bfc60b09522bd6f47660b835f0681977a28e1de (diff)
downloadpasst-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar.gz
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar.bz2
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar.lz
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar.xz
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.tar.zst
passt-dec3d73e1e8e007d05f9dce9a48aca7cb8532992.zip
migrate, tcp: bind() migrated sockets in repair mode
Currently on a migration target, we create then immediately bind() new sockets for the TCP connections we're reconstructing. Mostly, this works, since a socket() that is bound but hasn't had listen() or connect() called is essentially passive. However, this bind() is subject to the usual address conflict checking. In particular that means if we already have a listening socket on that port, we'll get an EADDRINUSE. This will happen for every connection we try to migrate that was initiated from outside to the guest, since we necessarily created a listening socket for that case. We set SO_REUSEADDR on the socket in an attempt to avoid this, but that's not sufficient; even with SO_REUSEADDR address conflicts are still prohibited for listening sockets. Of course once these incoming sockets are fully repaired and connect()ed they'll no longer conflict, but that doesn't help us if we fail at the bind(). We can avoid this by not calling bind() until we're already in repair mode which suppresses this transient conflict. Because of the batching of setting repair mode, to do that we need to move the bind to a step in tcp_flow_migrate_target_ext(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu')
0 files changed, 0 insertions, 0 deletions