Skip to content
Snippets Groups Projects
Commit 250a35fc authored by Michael Tüxen's avatar Michael Tüxen
Browse files

OpenBSD and NetBSD don't allow creating a tun device, which is

not yet used.
parent 10fa37e0
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,11 @@ static void create_device(struct config *config, struct local_netdev *netdev) ...@@ -186,7 +186,11 @@ static void create_device(struct config *config, struct local_netdev *netdev)
if (config->tun_device != NULL) { if (config->tun_device != NULL) {
asprintf(&tun_path, "%s/%s", TUN_DIR, config->tun_device); asprintf(&tun_path, "%s/%s", TUN_DIR, config->tun_device);
} else { } else {
#if defined(__FreeBSD__)
asprintf(&tun_path, "%s/%s", TUN_DIR, "tun"); asprintf(&tun_path, "%s/%s", TUN_DIR, "tun");
#else
asprintf(&tun_path, "%s/%s", TUN_DIR, "tun0");
#endif
} }
#endif #endif
#if defined(linux) #if defined(linux)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment