X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fbsd%2Fdevice.c;h=183f57cafed24bddf3a0d6136946417e42a5540f;hb=ea20820d229510ca0a915dc2a0a74249178e1c55;hp=3e9cfb271407f23885711f736fd21be9385ec746;hpb=29a95c30e9fc2533227250a0f669d165316b72cf;p=tinc diff --git a/src/bsd/device.c b/src/bsd/device.c index 3e9cfb27..183f57ca 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction BSD tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, - 2001-2014 Guus Sliepen + 2001-2016 Guus Sliepen 2009 Grzegorz Dymarek This program is free software; you can redistribute it and/or modify @@ -75,6 +75,8 @@ static bool setup_device(void) { if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device); + else if(strcmp(iface, strrchr(device, '/') ? strrchr(device, '/') + 1 : device)) + logger(LOG_WARNING, "Warning: Interface does not match Device. $INTERFACE might be set incorrectly."); if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) { if(!strcasecmp(type, "tun"))