X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Flinux%2Fdevice.c;h=6d02b470261ebab55e454d1fd966a4e26776fc60;hp=2e447556ae8b0b277557400c8e550449731cdc57;hb=ab7c61b06f6c6e991225f2fcc32d02b8e1084aee;hpb=78fc59e994c764d072bf0045177f690a378d1308 diff --git a/src/linux/device.c b/src/linux/device.c index 2e447556..6d02b470 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -13,11 +13,9 @@ 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