summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/linux-cp/lcp_nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/linux-cp/lcp_nl.c b/src/plugins/linux-cp/lcp_nl.c
index 8a55f4c5edd..1c0ca0d5cd5 100644
--- a/src/plugins/linux-cp/lcp_nl.c
+++ b/src/plugins/linux-cp/lcp_nl.c
@@ -496,7 +496,7 @@ lcp_nl_open_socket (void)
nl_connect (nm->sk_route, NETLINK_ROUTE);
- if (dest_ns_fd)
+ if (dest_ns_fd && curr_ns_fd >= 0)
{
setns (curr_ns_fd, CLONE_NEWNET);
close (curr_ns_fd);