From 63f8303a5dc1758876451a580a8317dbc3d295d6 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 2 Mar 2012 16:09:58 +0100 Subject: [PATCH 1/2] Only log errors sending UDP packets when debug level >= 5. Since tinc will fall back to TCP or route via another node, it is not necessary to log such errors unconditionally. --- src/net_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_packet.c b/src/net_packet.c index 4b3496d3..e3a57b17 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -537,7 +537,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { if(n->mtu >= origlen) n->mtu = origlen - 1; } else - logger(LOG_ERR, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno)); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno)); } end: From 9dea33f5301119dd4423eb962956cf2d246af3f3 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 7 Mar 2012 10:40:06 +0100 Subject: [PATCH 2/2] Accept Subnets passed with the -o option when StrictSubnets = yes. --- src/net_setup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/net_setup.c b/src/net_setup.c index bab50fe4..26845143 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -221,7 +221,6 @@ void load_all_subnets(void) { config_t *cfg; subnet_t *s, *s2; node_t *n; - bool result; xasprintf(&dname, "%s/hosts", confbase); dir = opendir(dname); @@ -243,10 +242,9 @@ void load_all_subnets(void) { xasprintf(&fname, "%s/hosts/%s", confbase, ent->d_name); init_configuration(&config_tree); - result = read_config_file(config_tree, fname); + read_config_options(config_tree, ent->d_name); + read_config_file(config_tree, fname); free(fname); - if(!result) - continue; if(!n) { n = new_node();