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 comment above. Why need - 1 here?

(ntohl(tcp_pkt->th_ack) - 1) is the primary seq
So, we need -1 here.

Thanks
Zhang Chen

Aha, right. Since we can't get the syn,ack packet sent by guest from primary node.

Better add a comment to explain this.

Thanks

Reply via email to