Message ID | 1545086594-125228-4-git-send-email-dlu998@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v4,1/4] conntrack: Skip ephemeral ports fallback for DNAT. | expand |
On Mon, Dec 17, 2018 at 02:43:14PM -0800, Darrell Ball wrote: > Add check to validate that 'conn_clean()' is only called for > conntrack entries of default 'conn_type'. > > Signed-off-by: Darrell Ball <dlu998@gmail.com> Applied to master, thanks!
diff --git a/lib/conntrack.c b/lib/conntrack.c index 41232f4..7b5a3f0 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -803,11 +803,14 @@ nat_clean(struct conntrack *ct, struct conn *conn, ct_lock_lock(&ctb->lock); } +/* Must be called with 'CT_CONN_TYPE_DEFAULT' 'conn_type'. */ static void conn_clean(struct conntrack *ct, struct conn *conn, struct conntrack_bucket *ctb) OVS_REQUIRES(ctb->lock) { + ovs_assert(conn->conn_type == CT_CONN_TYPE_DEFAULT); + if (conn->alg) { expectation_clean(ct, &conn->key, ct->hash_basis); }
Add check to validate that 'conn_clean()' is only called for conntrack entries of default 'conn_type'. Signed-off-by: Darrell Ball <dlu998@gmail.com> --- lib/conntrack.c | 3 +++ 1 file changed, 3 insertions(+)