/* Mutable data. */
struct ovs_mutex lock; /* Guards all mutable fields. */
ovs_u128 label;
- uint32_t mark;
long long expiration;
+ uint32_t mark;
int seq_skew;
bool seq_skew_dir; /* TCP sequence skew direction due to NATTing of FTP
* control messages; true if reply direction. */
+ bool cleaned; /* True if cleaned from expiry lists. */
/* Immutable data. */
bool alg_related; /* True if alg data connection. */
ovs_mutex_lock(&ct->ct_lock);
ovs_mutex_lock(&conn->lock);
- conn->expiration = now + ct_timeout_val[tm];
- ovs_list_remove(&conn->exp_node);
- ovs_list_push_back(&ct->exp_lists[tm], &conn->exp_node);
+ if (!conn->cleaned) {
+ conn->expiration = now + ct_timeout_val[tm];
+ ovs_list_remove(&conn->exp_node);
+ ovs_list_push_back(&ct->exp_lists[tm], &conn->exp_node);
+ }
ovs_mutex_unlock(&conn->lock);
ovs_mutex_unlock(&ct->ct_lock);
cmap_remove(&ct->conns, &conn->nat_conn->cm_node, hash);
}
ovs_list_remove(&conn->exp_node);
+ conn->cleaned = true;
ovsrcu_postpone(delete_conn, conn);
atomic_count_dec(&ct->n_conn);
}
conn_clean_cmn(ct, conn);
if (conn->conn_type == CT_CONN_TYPE_DEFAULT) {
ovs_list_remove(&conn->exp_node);
+ conn->cleaned = true;
atomic_count_dec(&ct->n_conn);
}
ovsrcu_postpone(delete_conn_one, conn);