[ovs-dev] [patch v2 5/6] conntrack: Add rare case info log to nat_clean.

Darrell Ball dlu998 at gmail.com
Wed Sep 5 05:14:49 UTC 2018


It is not an error, but good to know about.

Signed-off-by: Darrell Ball <dlu998 at gmail.com>
---
 lib/conntrack.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/conntrack.c b/lib/conntrack.c
index 065c337..4b29c31 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -795,11 +795,15 @@ nat_clean(struct conntrack *ct, struct conn *conn,
     /* In the unlikely event, 'rev_conn' was recreated, then skip
      * 'rev_conn' cleanup. */
     if (rev_conn && (!nat_conn_key_node ||
-                     conn_key_cmp(&nat_conn_key_node->value,
-                                  &rev_conn->rev_key))) {
+        conn_key_cmp(&nat_conn_key_node->value, &rev_conn->rev_key))) {
         hmap_remove(&ct->buckets[bucket_rev_conn].connections,
                     &rev_conn->node);
         free(rev_conn);
+    } else {
+        char *log_msg = xasprintf("Rare nat_clean case %p/%p/%p", conn,
+                                  rev_conn, nat_conn_key_node);
+        ct_print_conn_info(conn, log_msg, VLL_INFO, true, false);
+        free(log_msg);
     }
 
     delete_conn(conn);
-- 
1.9.1



More information about the dev mailing list