mirror of
https://github.com/norohind/hans.git
synced 2025-06-10 20:32:20 +03:00
Log opened tunnel device
This commit is contained in:
parent
0d03ebbefe
commit
d79187028a
@ -50,6 +50,8 @@ Tun::Tun(const char *device, int mtu)
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
throw Exception(string("could not create tunnel device: ") + tun_last_error());
|
throw Exception(string("could not create tunnel device: ") + tun_last_error());
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "opened tunnel device: %s", this->device);
|
||||||
|
|
||||||
char cmdline[512];
|
char cmdline[512];
|
||||||
snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s mtu %u", this->device, mtu);
|
snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s mtu %u", this->device, mtu);
|
||||||
if (system(cmdline) != 0)
|
if (system(cmdline) != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user