From e5c7437e17a5d7b6ad78dc2cc757b86b8859c23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Thu, 15 Oct 2015 17:11:09 +0200 Subject: [PATCH] Fix default tun/tap issue with multiple tunslip6 When running multiple tunslip6 instances, it collides with tun0 being already used (cannot open file). However, system default is already to use "tun0" and "tap0". By putting the default empty string as name, system automatically increment and selects a free interface, "tun0", "tun1". --- tools/tunslip6.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tools/tunslip6.c b/tools/tunslip6.c index 4f3ff7e3e..3dda01c66 100644 --- a/tools/tunslip6.c +++ b/tools/tunslip6.c @@ -852,14 +852,6 @@ exit(1); break; } - if(*tundev == '\0') { - /* Use default. */ - if(tap) { - strcpy(tundev, "tap0"); - } else { - strcpy(tundev, "tun0"); - } - } if(host != NULL) { struct addrinfo hints, *servinfo, *p; int rv;