diff --git a/net.c b/net.c index 1c3a35f..fd6fff1 100644 --- a/net.c +++ b/net.c @@ -59,6 +59,8 @@ bool netInitNsFromParent(struct nsjconf_t *nsjconf, int pid) return true; } + LOG_D("Putting iface:'%s' into namespace of PID:%d (with libnl3)", nsjconf->iface, pid); + struct nl_sock *sk = nl_socket_alloc(); if (sk == NULL) { LOG_E("Could not allocate socket with nl_socket_alloc()"); @@ -124,6 +126,8 @@ bool netInitNsFromParent(struct nsjconf_t *nsjconf, int pid) return true; } + LOG_D("Putting iface:'%s' into namespace of PID:%d (with /sbin/ip)", nsjconf->iface, pid); + char pid_str[256]; snprintf(pid_str, sizeof(pid_str), "%d", pid); @@ -337,7 +341,7 @@ static bool netConfigureVs(struct nsjconf_t *nsjconf) return false; } if (addr.s_addr == INADDR_ANY) { - LOG_I("IPv4 address for interface '%s' not set", IFACE_NAME); + LOG_D("IPv4 address for interface '%s' not set", IFACE_NAME); close(sock); return true; } @@ -375,7 +379,7 @@ static bool netConfigureVs(struct nsjconf_t *nsjconf) return false; } if (addr.s_addr == INADDR_ANY) { - LOG_I("Gateway address for '%s' is not set", IFACE_NAME); + LOG_D("Gateway address for '%s' is not set", IFACE_NAME); close(sock); return true; } diff --git a/subproc.h b/subproc.h index 6607b76..a7fd328 100644 --- a/subproc.h +++ b/subproc.h @@ -33,6 +33,7 @@ void subprocDisplay(struct nsjconf_t *nsjconf); void subprocKillAll(struct nsjconf_t *nsjconf); int subprocSystem(const char **argv, char **env); pid_t subprocClone(uintptr_t flags); +void subprocCloneFlags(struct nsjconf_t *nsjconf); /* Returns the exit code of the first failing subprocess, or 0 if none fail */ int subprocReap(struct nsjconf_t *nsjconf);