This should help debugging problems with migration.
[This is a candidate to be folded into the earlier patch]
Signed-off-by: David Gibson
---
tcp.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tcp.c b/tcp.c
index 3760e67a..7ce0f4cb 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1011,10 +1011,17 @@ int tcp_flow_repair_connect(struct ctx *c, struct tcp_tap_conn *conn)
{
struct flowside *tgt = &conn->f.side[TGTSIDE];
struct tcp_repair_opt opts[2];
+ int rc;
- tcp_flow_repair_seq(c, conn, true);
+ rc = tcp_flow_repair_seq(c, conn, true);
+ if (rc)
+ return rc;
- flowside_connect(c, conn->sock, PIF_HOST, tgt);
+ rc = flowside_connect(c, conn->sock, PIF_HOST, tgt);
+ if (rc) {
+ err("Failed to connect repaired socket: %s", strerror_(errno));
+ return rc;
+ }
/* FIXME: Fetch those with TCP_REPAIR_OPTIONS and store in migration
* data. These hardcoded values just happen to be good enough.
--
2.48.1