- } else if(!ioctl(device_fd, (('T' << 8) | 202), &ifr)) {
- logger(LOG_WARNING, "Old ioctl() request was needed for %s", device);
- strncpy(ifrname, ifr.ifr_name, IFNAMSIZ);
- if(iface) free(iface);
- iface = xstrdup(ifrname);
- } else
-#endif
- {
- if(routing_mode == RMODE_ROUTER)
- overwrite_mac = true;
- device_info = "Linux ethertap device";
- device_type = DEVICE_TYPE_ETHERTAP;
- if(iface)
- free(iface);
- iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device);
+ } else {
+ logger(DEBUG_ALWAYS, LOG_ERR, "Could not create a tun/tap interface from %s: %s", device, strerror(errno));
+ return false;