Thread (16 messages) 16 messages, 2 authors, 2018-06-08

Re: [PATCH iproute2 v2 1/2] ip: display netns name instead of nsid

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-06-05 16:52:32

On Tue,  5 Jun 2018 15:08:30 +0200
Nicolas Dichtel [off-list ref] wrote:
 
+char *get_name_from_nsid(int nsid)
+{
+	struct nsid_cache *c;
+
+	netns_nsid_socket_init();
+	netns_map_init();
+
+	c = netns_map_get_by_nsid(nsid);
+	if (c)
+		return c->name;
+
+	return NULL;
+}
+
This is better, but now there is a different problem.
When doing multiple interfaces, won't the initialization code be called twice?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help