aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-02-27 16:55:17 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-02-28 01:32:38 +0100
commit52419a64f2dfa31707b31148e6a311bb57be6e5f (patch)
treec3543061ce32ffece9656e3e77b090d0fb2b8280 /contrib/qemu
parentb2708218a6eec82fad98da52d7569d13cf35e05c (diff)
downloadpasst-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar.gz
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar.bz2
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar.lz
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar.xz
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.tar.zst
passt-52419a64f2dfa31707b31148e6a311bb57be6e5f.zip
migrate, tcp: Don't flow_alloc_cancel() during incoming migration
In tcp_flow_migrate_target(), if we're unable to create and bind the new socket, we print an error, cancel the flow and carry on. This seems to make sense based on our policy of generally letting the migration complete even if some or all flows are lost in the process. But it doesn't quite work: the flow_alloc_cancel() means that the flows in the target's flow table are no longer one to one match to the flows which the source is sending data for. This means that data for later flows will be mismatched to a different flow. Most likely that will cause some nasty error later, but even worse it might appear to succeed but lead to data corruption due to incorrectly restoring one of the flows. Instead, we should leave the flow in the table until we've read all the data for it, *then* discard it. Technically removing the flow_alloc_cancel() would be enough for this: if tcp_flow_repair_socket() fails it leaves conn->sock == -1, which will cause the restore functions in tcp_flow_migrate_target_ext() to fail, discarding the flow. To make what's going on clearer (and with less extraneous error messages), put several explicit tests for a missing socket later in the migration path to read the data associated with the flow but explicitly discard it. 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