X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fbsd%2Fdevice.c;h=fe2d6c5201cf39b9ea38218253de53cca9ef638e;hb=3a149f7521dfff67e6a790c1a830afc649ae083e;hp=57029d5d7e0f6b387478146384f6bf2b3f8fdb51;hpb=bf81fce8ff7a244ecdfbe2d5535bdf4df07b3f35;p=tinc diff --git a/src/bsd/device.c b/src/bsd/device.c index 57029d5d..fe2d6c52 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -125,13 +125,13 @@ static bool setup_utun(void) { #endif static bool setup_device(void) { - get_config_string(lookup_config(config_tree, "Device"), &device); + get_config_string(lookup_config(&config_tree, "Device"), &device); // Find out if it's supposed to be a tun or a tap device char *type; - if(get_config_string(lookup_config(config_tree, "DeviceType"), &type)) { + if(get_config_string(lookup_config(&config_tree, "DeviceType"), &type)) { if(!strcasecmp(type, "tun")) /* use default */; @@ -233,7 +233,7 @@ static bool setup_device(void) { realname = device; } - if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) { + if(!get_config_string(lookup_config(&config_tree, "Interface"), &iface)) { iface = xstrdup(strrchr(realname, '/') ? strrchr(realname, '/') + 1 : realname); } else if(strcmp(iface, strrchr(realname, '/') ? strrchr(realname, '/') + 1 : realname)) { logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: Interface does not match Device. $INTERFACE might be set incorrectly.");