From cc93166b599faf67fa6252b7b7269a61be85eff1 Mon Sep 17 00:00:00 2001 From: Alexander Maltsev Date: Wed, 10 Sep 2025 18:57:03 +0500 Subject: [PATCH] vppinfra: zero-terminate self netns path Fix tap_create_if sometimes failing to get current netns. Type: fix Change-Id: I30f7cd623028da52240d8d29077a01a59cb96f77 Signed-off-by: Alexander Maltsev --- src/vppinfra/linux/netns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vppinfra/linux/netns.c b/src/vppinfra/linux/netns.c index 2bd62bd7d92..487be485c13 100644 --- a/src/vppinfra/linux/netns.c +++ b/src/vppinfra/linux/netns.c @@ -27,7 +27,7 @@ clib_netns_open (u8 *netns_u8) int fd; if ((NULL) == netns) - s = format (0, "/proc/self/ns/net"); + s = format (0, "/proc/self/ns/net%c", 0); else if (strncmp (netns, "pid:", 4) == 0) s = format (0, "/proc/%u/ns/net%c", atoi (netns + 4), 0); else if (netns[0] == '/') -- 2.16.6