Update the address of the Free Software Foundation in all copyright headers.
[tinc] / src / linux / device.c
index 0069f54..6d02b47 100644 (file)
@@ -1,7 +1,7 @@
 /*
     device.c -- Interaction with Linux ethertap and tun/tap device
     Copyright (C) 2001-2005 Ivo Timmermans,
-                  2001-2006 Guus Sliepen <guus@tinc-vpn.org>
+                  2001-2009 Guus Sliepen <guus@tinc-vpn.org>
 
     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
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
-    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$
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
 #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