- char *type;
-
- if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
- if(routing_mode == RMODE_ROUTER)
- device = xstrdup(DEFAULT_TUN_DEVICE);
- else
- device = xstrdup(DEFAULT_TAP_DEVICE);
- }
-
- if(!get_config_string(lookup_config(config_tree, "Interface"), &iface))
- iface = NULL;
-#ifndef TAPGIFNAME
- if (iface) {
- logger(DEBUG_ALWAYS, LOG_WARNING, "Ignoring specified interface name '%s' as device rename is not supported on this platform", iface);
- free(iface);
- iface = NULL;
- }
-#endif
- if (!iface)
- iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device);