Merge branch 'master' into 1.1

Conflicts:
	doc/tincd.8.in
	lib/pidfile.c
	src/graph.c
	src/net.c
	src/net.h
	src/net_packet.c
	src/net_setup.c
	src/net_socket.c
	src/netutl.c
	src/node.c
	src/node.h
	src/protocol_auth.c
	src/protocol_key.c
	src/tincd.c
This commit is contained in:
Guus Sliepen 2010-11-12 16:15:29 +01:00
commit a22041922f
33 changed files with 294 additions and 161 deletions

View file

@ -36,6 +36,9 @@
#include "subnet.h"
#include "xalloc.h"
int contradicting_add_edge = 0;
int contradicting_del_edge = 0;
/* Purge edges and subnets of unreachable nodes. Use carefully. */
void purge(void) {
@ -189,6 +192,19 @@ static void timeout_handler(int fd, short events, void *event) {
}
}
if(contradicting_del_edge && contradicting_add_edge) {
logger(LOG_WARNING, "Possible node with same Name as us!");
if(rand() % 3 == 0) {
logger(LOG_ERR, "Shutting down, check configuration of all nodes for duplicate Names!");
event_loopexit(NULL);
return;
}
contradicting_add_edge = 0;
contradicting_del_edge = 0;
}
event_add(event, &(struct timeval){pingtimeout, 0});
}
@ -275,6 +291,7 @@ int reload_configuration(void) {
if(strictsubnets) {
subnet_t *subnet;
for(node = subnet_tree->head; node; node = node->next) {
subnet = node->data;
subnet->expires = 1;