summaryrefslogtreecommitdiff
path: root/src/linux/tunDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/tunDevice.cpp')
-rw-r--r--src/linux/tunDevice.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/linux/tunDevice.cpp b/src/linux/tunDevice.cpp
index dba22e5..403cd99 100644
--- a/src/linux/tunDevice.cpp
+++ b/src/linux/tunDevice.cpp
@@ -168,7 +168,14 @@ void TunDevice::do_ifconfig()
int result = system(command.str().c_str());
if(result == -1)
- cLog.msg(Log::PRIO_ERR) << "Execution of ifconfig failed";
- else
- cLog.msg(Log::PRIO_NOTICE) << "ifconfig returned " << WEXITSTATUS(result);
+ cLog.msg(Log::PRIO_ERR) << "Execution of ifconfig failed: " << LogErrno(errno);
+ else {
+ if(WIFEXITED(result))
+ cLog.msg(Log::PRIO_NOTICE) << "ifconfig returned " << WEXITSTATUS(result);
+ else if(WIFSIGNALED(result))
+ cLog.msg(Log::PRIO_NOTICE) << "ifconfig terminated after signal " << WTERMSIG(result);
+ else
+ cLog.msg(Log::PRIO_ERR) << "Execution of ifconfig: unkown error";
+ }
+
}