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

Message ID 1536124490-86810-5-git-send-email-dlu998@gmail.com
State New
Headers show
Series
  • [ovs-dev,v2,1/6] conntrack: Handle self nat case.
Related show

Commit Message

Darrell Ball Sept. 5, 2018, 5:14 a.m.
It is not an error, but good to know about.

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

Patch

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);