Fix data type conversion of compare_timeout. The incorrect conversion results in a random compare_timeout value and unexpected stalls in packet comparison.
Signed-off-by: Derek Su <dere...@qnap.com> --- net/colo-compare.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 2c20de1537..c4de86ef34 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -619,11 +619,12 @@ static int colo_packet_compare_other(Packet *spkt, Packet *ppkt) ppkt->size - offset); } -static int colo_old_packet_check_one(Packet *pkt, int64_t *check_time) +static int colo_old_packet_check_one(Packet *pkt, void *user_data) { int64_t now = qemu_clock_get_ms(QEMU_CLOCK_HOST); + uint32_t check_time = *(uint32_t *)user_data; - if ((now - pkt->creation_ms) > (*check_time)) { + if ((now - pkt->creation_ms) > check_time) { trace_colo_old_packet_check_found(pkt->creation_ms); return 0; } else { -- 2.25.1