]> git.proxmox.com Git - mirror_lxc.git/commitdiff
network: expose namespace fd paths to network hooks
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 14 Feb 2021 13:07:44 +0000 (14:07 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 14 Feb 2021 14:42:10 +0000 (15:42 +0100)
Closes: #3667
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/network.c

index 646b35c8af003a2524f52c081e3a6bc8afc04062..3fb2846b2b31fa14282fe75c724d7fe8245741a6 100644 (file)
@@ -3977,6 +3977,13 @@ void lxc_delete_network(struct lxc_handler *handler)
 {
        bool bret;
 
+       /*
+        * Always expose namespace fd paths to network down hooks via
+        * environment variables. No need to complicate things by passing them
+        * as additional hook arguments.
+        */
+       lxc_expose_namespace_environment(handler);
+
        if (handler->am_root)
                bret = lxc_delete_network_priv(handler);
        else