X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmulticast_device.c;h=e9607f0da87b7223e73e531754115957efb6faa7;hb=refs%2Fheads%2F1.1;hp=82f7fec03584ab405cb5b5a7a98753deb7b64180;hpb=2c6b2d70e6640f39563ad7bb0aa0ba87f883848c;p=tinc diff --git a/src/multicast_device.c b/src/multicast_device.c index 82f7fec0..3dba7f79 100644 --- a/src/multicast_device.c +++ b/src/multicast_device.c @@ -39,9 +39,9 @@ static bool setup_device(void) { char *space; int ttl = 1; - get_config_string(lookup_config(config_tree, "Interface"), &iface); + get_config_string(lookup_config(&config_tree, "Interface"), &iface); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) { + if(!get_config_string(lookup_config(&config_tree, "Device"), &device)) { logger(DEBUG_ALWAYS, LOG_ERR, "Device variable required for %s", device_info); goto error; } @@ -144,6 +144,7 @@ static bool setup_device(void) { logger(DEBUG_ALWAYS, LOG_INFO, "%s is a %s", device, device_info); + free(host); return true; error: @@ -188,7 +189,7 @@ static bool read_packet(vpn_packet_t *packet) { } if(!memcmp(&ignore_src, DATA(packet) + 6, sizeof(ignore_src))) { - logger(DEBUG_SCARY_THINGS, LOG_DEBUG, "Ignoring loopback packet of %zd bytes from %s", lenin, device_info); + logger(DEBUG_SCARY_THINGS, LOG_DEBUG, "Ignoring loopback packet of %ld bytes from %s", (long)lenin, device_info); return false; }