diff options
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/extra/pppd_compat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c index 915ef71d..56dba5e9 100644 --- a/accel-pppd/extra/pppd_compat.c +++ b/accel-pppd/extra/pppd_compat.c @@ -269,7 +269,10 @@ static void ev_ses_pre_up(struct ap_session *ses) sigfillset(&set); pthread_sigmask(SIG_UNBLOCK, &set, NULL); + net->enter_ns(); execve(conf_ip_pre_up, argv, env); + net->exit_ns(); + log_emerg("pppd_compat: exec '%s': %s\n", conf_ip_pre_up, strerror(errno)); _exit(EXIT_FAILURE); } else @@ -316,7 +319,10 @@ static void ev_ses_started(struct ap_session *ses) sigfillset(&set); pthread_sigmask(SIG_UNBLOCK, &set, NULL); + net->enter_ns(); execve(conf_ip_up, argv, env); + net->exit_ns(); + log_emerg("pppd_compat: exec '%s': %s\n", conf_ip_up, strerror(errno)); _exit(EXIT_FAILURE); } else @@ -373,7 +379,10 @@ static void ev_ses_finished(struct ap_session *ses) sigfillset(&set); pthread_sigmask(SIG_UNBLOCK, &set, NULL); + net->enter_ns(); execve(conf_ip_down, argv, env); + net->exit_ns(); + log_emerg("pppd_compat: exec '%s': %s\n", conf_ip_down, strerror(errno)); _exit(EXIT_FAILURE); } else @@ -459,7 +468,10 @@ static void ev_radius_coa(struct ev_radius_t *ev) if (!ev->res) ev->res = pd->res; } else if (pid == 0) { + net->enter_ns(); execve(conf_ip_change, argv, env); + net->exit_ns(); + log_emerg("pppd_compat: exec '%s': %s\n", conf_ip_change, strerror(errno)); _exit(EXIT_FAILURE); } else |