Refactor network namespace specific functions in generic helpers

This commit is contained in:
Xℹ Ruoyao
2021-03-04 00:04:36 +08:00
parent a959cd2812
commit 54c2459d56
11 changed files with 88 additions and 59 deletions
+1 -1
View File
@@ -4563,7 +4563,7 @@ static int run_container(
if (child_netns_fd < 0)
return log_error_errno(errno, "Cannot open file %s: %m", arg_network_namespace_path);
r = fd_is_network_ns(child_netns_fd);
r = fd_is_ns(child_netns_fd, CLONE_NEWNET);
if (r == -EUCLEAN)
log_debug_errno(r, "Cannot determine if passed network namespace path '%s' really refers to a network namespace, assuming it does.", arg_network_namespace_path);
else if (r < 0)