mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
COLO-compare: Fix icmp and udp compare different packet always dump bug
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
6efeb3286d
commit
1723a7f7cf
1 changed files with 12 additions and 6 deletions
|
@ -279,9 +279,13 @@ static int colo_packet_compare_udp(Packet *spkt, Packet *ppkt)
|
|||
|
||||
if (ret) {
|
||||
trace_colo_compare_udp_miscompare("primary pkt size", ppkt->size);
|
||||
qemu_hexdump((char *)ppkt->data, stderr, "colo-compare", ppkt->size);
|
||||
trace_colo_compare_udp_miscompare("Secondary pkt size", spkt->size);
|
||||
qemu_hexdump((char *)spkt->data, stderr, "colo-compare", spkt->size);
|
||||
if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
|
||||
qemu_hexdump((char *)ppkt->data, stderr, "colo-compare pri pkt",
|
||||
ppkt->size);
|
||||
qemu_hexdump((char *)spkt->data, stderr, "colo-compare sec pkt",
|
||||
spkt->size);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -311,12 +315,14 @@ static int colo_packet_compare_icmp(Packet *spkt, Packet *ppkt)
|
|||
network_header_length + ETH_HLEN)) {
|
||||
trace_colo_compare_icmp_miscompare("primary pkt size",
|
||||
ppkt->size);
|
||||
qemu_hexdump((char *)ppkt->data, stderr, "colo-compare",
|
||||
ppkt->size);
|
||||
trace_colo_compare_icmp_miscompare("Secondary pkt size",
|
||||
spkt->size);
|
||||
qemu_hexdump((char *)spkt->data, stderr, "colo-compare",
|
||||
spkt->size);
|
||||
if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
|
||||
qemu_hexdump((char *)ppkt->data, stderr, "colo-compare pri pkt",
|
||||
ppkt->size);
|
||||
qemu_hexdump((char *)spkt->data, stderr, "colo-compare sec pkt",
|
||||
spkt->size);
|
||||
}
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue