diff mbox series

netfilter: nf_conntrack: table full detailed log

Message ID 20250508081313.57914-1-xiafei_xupt@163.com
State New
Headers show
Series netfilter: nf_conntrack: table full detailed log | expand

Commit Message

lvxiafei May 8, 2025, 8:13 a.m. UTC
From: lvxiafei <lvxiafei@sensetime.com>

Add the netns field in the "nf_conntrack: table full,
dropping packet" log to help locate the specific netns
when the table is full.

Signed-off-by: lvxiafei <lvxiafei@sensetime.com>
---
 net/netfilter/nf_conntrack_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 7f8b245e287a..71849960cf0c 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1659,7 +1659,8 @@  __nf_conntrack_alloc(struct net *net,
 			if (!conntrack_gc_work.early_drop)
 				conntrack_gc_work.early_drop = true;
 			atomic_dec(&cnet->count);
-			net_warn_ratelimited("nf_conntrack: table full, dropping packet\n");
+			net_warn_ratelimited("nf_conntrack: table full in netns %u, dropping packet\n",
+					     net->ns.inum);
 			return ERR_PTR(-ENOMEM);
 		}
 	}