From 745a9ba4284cbe055aac3fadb57efe531c4e3a96 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 18 Feb 2022 16:12:11 +0100 Subject: pasta: By default, quit if filesystem-bound net namespace goes away This should be convenient for users managing filesystem-bound network namespaces: monitor the base directory of the namespace and exit if the namespace given as PATH or NAME target is deleted. We can't add an inotify watch directly on the namespace directory, that won't work with nsfs. Add an option to disable this behaviour, --no-netns-quit. Signed-off-by: Stefano Brivio --- pasta.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pasta.h') diff --git a/pasta.h b/pasta.h index 1fcd6a9..235bfb9 100644 --- a/pasta.h +++ b/pasta.h @@ -6,3 +6,5 @@ void pasta_start_ns(struct ctx *c); void pasta_ns_conf(struct ctx *c); void pasta_child_handler(int signal); +int pasta_netns_quit_init(struct ctx *c); +void pasta_netns_quit_handler(struct ctx *c, int inotify_fd); -- cgit v1.2.3