mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
parent
fc16352198
commit
08b992cbb7
|
@ -78,7 +78,7 @@ int tuntap_open(tuntap_dev *device,
|
||||||
|
|
||||||
device->fd = open(tuntap_device, O_RDWR);
|
device->fd = open(tuntap_device, O_RDWR);
|
||||||
if(device->fd < 0) {
|
if(device->fd < 0) {
|
||||||
traceEvent(TRACE_ERROR, "ioctl() [%s][%d]\n", strerror(errno), errno);
|
traceEvent(TRACE_ERROR, "tuntap open() error: %s[%d]. Is the tun kernel module loaded?\n", strerror(errno), errno);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ int tuntap_open(tuntap_dev *device,
|
||||||
rc = ioctl(device->fd, TUNSETIFF, (void *)&ifr);
|
rc = ioctl(device->fd, TUNSETIFF, (void *)&ifr);
|
||||||
|
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
traceEvent(TRACE_ERROR, "ioctl() [%s][%d]\n", strerror(errno), rc);
|
traceEvent(TRACE_ERROR, "tuntap ioctl(TUNSETIFF, IFF_TAP) error: %s[%d]\n", strerror(errno), rc);
|
||||||
close(device->fd);
|
close(device->fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user