X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Flinux%2Fdevice.c;h=802a186157f6abd063bcc7d4d2bca5e3715afc3c;hp=0069f54c08b27039405d5842e86f1c0300f0b955;hb=c217d214f4f071c235bc7c463a1da6124e2570a6;hpb=a39a9506cd041a7092a98498b362eaacfd2f33c3 diff --git a/src/linux/device.c b/src/linux/device.c index 0069f54c..802a1861 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction with Linux ethertap and tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, - 2001-2006 Guus Sliepen + 2001-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" @@ -63,7 +61,8 @@ bool setup_device(void) if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) #ifdef HAVE_LINUX_IF_TUN_H - iface = xstrdup(netname); + if (netname != NULL) + iface = xstrdup(netname); #else iface = xstrdup(rindex(device, '/') ? rindex(device, '/') + 1 : device); #endif