projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Solaris tun device handling cleaned up a bit and added.
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
fbefa8c
..
e96ae51
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net.c,v 1.35.4.13
4 2001/10/08 11:47:55
guus Exp $
+ $Id: net.c,v 1.35.4.13
6 2001/10/08 13:37:30
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-1284,17
+1284,18
@@
cp
void check_dead_connections(void)
{
time_t now;
void check_dead_connections(void)
{
time_t now;
- avl_node_t *node;
+ avl_node_t *node
, *next
;
connection_t *cl;
cp
now = time(NULL);
connection_t *cl;
cp
now = time(NULL);
- for(node = connection_tree->head; node; node = n
ode->n
ext)
+ for(node = connection_tree->head; node; node = next)
{
{
+ next = node->next;
cl = (connection_t *)node->data;
cl = (connection_t *)node->data;
- if(cl->
status.active
)
+ if(cl->
last_ping_time + timeout < now
)
{
{
- if(cl->
last_ping_time + timeout < now
)
+ if(cl->
status.active
)
{
if(cl->status.pinged)
{
{
if(cl->status.pinged)
{
@@
-1309,6
+1310,13
@@
cp
send_ping(cl);
}
}
send_ping(cl);
}
}
+ else
+ {
+ if(debug_lvl >= DEBUG_CONNECTIONS)
+ syslog(LOG_WARNING, _("Timeout from %s (%s) during authentication"),
+ cl->name, cl->hostname);
+ terminate_connection(cl, 0);
+ }
}
}
cp
}
}
cp
@@
-1367,7
+1375,7
@@
cp
if(FD_ISSET(p->meta_socket, f))
if(receive_meta(p) < 0)
{
if(FD_ISSET(p->meta_socket, f))
if(receive_meta(p) < 0)
{
- terminate_connection(p, p->status.
meta
);
+ terminate_connection(p, p->status.
active
);
return;
}
}
return;
}
}