summary refs log tree commit diff stats
path: root/net/colo.c
diff options
context:
space:
mode:
authorZhang Chen <zhangckid@gmail.com>2018-09-03 12:38:57 +0800
committerJason Wang <jasowang@redhat.com>2018-10-19 11:15:03 +0800
commit24525e93c17aabdd88df893f1ceecc37e8b289f3 (patch)
tree2c0d07df813a7d4928a3c7622be7196df1b864e1 /net/colo.c
parent5fbba3d6594aab91a26c255776b80d454682d535 (diff)
downloadfocaccia-qemu-24525e93c17aabdd88df893f1ceecc37e8b289f3.tar.gz
focaccia-qemu-24525e93c17aabdd88df893f1ceecc37e8b289f3.zip
filter-rewriter: handle checkpoint and failover event
After one round of checkpoint, the states between PVM and SVM
become consistent, so it is unnecessary to adjust the sequence
of net packets for old connections, besides, while failover
happens, filter-rewriter will into failover mode that needn't
handle the new TCP connection.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Zhang Chen <zhangckid@gmail.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/colo.c')
-rw-r--r--net/colo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/colo.c b/net/colo.c
index 97c8fc928f..49176bf07b 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -221,3 +221,11 @@ Connection *connection_get(GHashTable *connection_track_table,
 
     return conn;
 }
+
+bool connection_has_tracked(GHashTable *connection_track_table,
+                            ConnectionKey *key)
+{
+    Connection *conn = g_hash_table_lookup(connection_track_table, key);
+
+    return conn ? true : false;
+}