On 2016年09月01日 13:00, Zhang Chen wrote:
+    /*
+     * The 'identification' field in the IP header is *very* random
+     * it almost never matches.  Fudge this by ignoring differences in
+ * unfragmented packets; they'll normally sort themselves out if different
+     * anyway, and it should recover at the TCP level.
+ * An alternative would be to get both the primary and secondary to rewrite + * somehow; but that would need some sync traffic to sync the state
+     */
+    if (ntohs(ppkt->ip->ip_off) & IP_DF) {
+        spkt->ip->ip_id = ppkt->ip->ip_id;
+        /* and the sum will be different if the IDs were different */
+        spkt->ip->ip_sum = ppkt->ip->ip_sum;
+    }
+
+    res = memcmp(ppkt->data + ETH_HLEN, spkt->data + ETH_HLEN,
+                (spkt->size - ETH_HLEN));

This may work but I worry about whether or not tagged packet can work here. Looks like parse_packet_early() can recognize vlan tag, but fill_connection_key() can not. This looks can result queuing wrong packets into wrong connection.

Currently COLO proxy can't support vlan, we will add this feature in the future.

Looks like current code can still queue vlan packets, please make sure it can't.

Thanks

Reply via email to