Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Jason Wang
On 2016年07月27日 17:05, Zhang Chen wrote: +if (((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == TH_ACK)) { +if (conn->syn_flag) { +/* offset = secondary_seq - primary seq */ +conn->offset -= (ntohl(tcp_pkt->th_ack) - 1); The code here is conflict with your

Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:03 PM, Jason Wang wrote: On 2016年07月05日 18:29, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and

Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Jason Wang
On 2016年07月05日 18:29, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest,

[Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-05 Thread Zhang Chen
We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest, secondary get it use filter-redirector.