X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=e6a1166fda1d5b958201796df93f1f617777ec00;hp=bed779a5c50b3ef78abdd5a29a40bfc5b1822540;hb=67766d65f06854ee894d784f638c5c9cd2b50bca;hpb=a91bf2dfcd0f5857905e59da7d944654e0875503 diff --git a/src/net.c b/src/net.c index bed779a5..e6a1166f 100644 --- a/src/net.c +++ b/src/net.c @@ -1,7 +1,7 @@ /* net.c -- most of the network code Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2010 Guus Sliepen + 2000-2011 Guus Sliepen 2006 Scott Lamb This program is free software; you can redistribute it and/or modify @@ -280,7 +280,7 @@ static void check_network_activity(fd_set * readset, fd_set * writeset) { int result, i; socklen_t len = sizeof(result); vpn_packet_t packet; - int errors = 0; + static int errors = 0; /* check input from kernel */ if(device_fd >= 0 && FD_ISSET(device_fd, readset)) { @@ -427,7 +427,7 @@ int main_loop(void) { keyexpires = now + keylifetime; } - if(contradicting_del_edge && contradicting_add_edge) { + if(contradicting_del_edge > 10 && contradicting_add_edge > 10) { logger(LOG_WARNING, "Possible node with same Name as us!"); if(rand() % 3 == 0) {