Log opened tunnel device

This commit is contained in:
Friedrich Schöller 2013-05-13 17:14:19 +02:00
parent 0d03ebbefe
commit d79187028a

View File

@ -50,6 +50,8 @@ Tun::Tun(const char *device, int mtu)
if (fd == -1)
throw Exception(string("could not create tunnel device: ") + tun_last_error());
syslog(LOG_INFO, "opened tunnel device: %s", this->device);
char cmdline[512];
snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s mtu %u", this->device, mtu);
if (system(cmdline) != 0)