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:
commit
a22041922f
33 changed files with 294 additions and 161 deletions
17
src/net.c
17
src/net.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue