TCP code needs to do different things depending on whether SO_PEEK_OFF
is enabled on the socket, and it assumes it is already set if it is
supported. However, we didn't re-enable it on sockets created for an
incoming migration.
Signed-off-by: David Gibson
---
tcp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tcp.c b/tcp.c
index 885ba3af..5b389ef8 100644
--- a/tcp.c
+++ b/tcp.c
@@ -3076,6 +3076,7 @@ int tcp_flow_migrate_target_ext(struct ctx *c, union flow *flow, int fd)
{
struct tcp_tap_conn *conn = &flow->tcp;
struct tcp_tap_transfer_ext t;
+ uint32_t peek_offset;
int s = conn->sock;
if (read_all_buf(fd, &t, sizeof(t)))
@@ -3104,5 +3105,9 @@ int tcp_flow_migrate_target_ext(struct ctx *c, union flow *flow, int fd)
tcp_flow_repair_off(c, conn);
+ peek_offset = conn->seq_to_tap - conn->seq_ack_from_tap;
+ if (tcp_set_peek_offset(conn->sock, peek_offset))
+ tcp_rst(c, conn);
+
return 0;
}
--
2.48.1