projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Fixed IPv6 subnet lookup routine.
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
85a4047
..
46c4c7b
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-1,7
+1,7
@@
/*
protocol.c -- handle the meta-protocol
/*
protocol.c -- handle the meta-protocol
- Copyright (C) 1999
,2000
Ivo Timmermans <itimmermans@bigfoot.com>,
-
2000
Guus Sliepen <guus@sliepen.warande.net>
+ Copyright (C) 1999
-2001
Ivo Timmermans <itimmermans@bigfoot.com>,
+
2000,2001
Guus Sliepen <guus@sliepen.warande.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-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: protocol.c,v 1.28.4.7
1 2001/01/05 23:53:51
guus Exp $
+ $Id: protocol.c,v 1.28.4.7
4 2001/01/07 17:09:02
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-35,6
+35,7
@@
#include <utils.h>
#include <xalloc.h>
#include <avl_tree.h>
#include <utils.h>
#include <xalloc.h>
#include <avl_tree.h>
+#include <list.h>
#include <netinet/in.h>
#include <netinet/in.h>
@@
-196,6
+197,7
@@
int id_h(connection_t *cl)
connection_t *old;
unsigned short int port;
char name[MAX_STRING_SIZE];
connection_t *old;
unsigned short int port;
char name[MAX_STRING_SIZE];
+ avl_node_t *node;
cp
if(sscanf(cl->buffer, "%*d "MAX_STRING" %d %lx %hd", name, &cl->protocol_version, &cl->options, &port) != 4)
{
cp
if(sscanf(cl->buffer, "%*d "MAX_STRING" %d %lx %hd", name, &cl->protocol_version, &cl->options, &port) != 4)
{
@@
-256,9
+258,9
@@
cp
/* And uhr... cl->port just changed so we have to unlink it from the connection tree and re-insert... */
/* And uhr... cl->port just changed so we have to unlink it from the connection tree and re-insert... */
- avl_unlink(connection_tree, cl);
+
node =
avl_unlink(connection_tree, cl);
cl->port = port;
cl->port = port;
- avl_insert
(connection_tree, cl
);
+ avl_insert
_node(connection_tree, node
);
/* Read in the public key, so that we can send a challenge */
/* Read in the public key, so that we can send a challenge */
@@
-1257,6
+1259,8
@@
cp
from->status.validkey = 1;
from->status.waitingforkey = 0;
from->status.validkey = 1;
from->status.waitingforkey = 0;
+
+ flush_queue(from);
cp
return 0;
}
cp
return 0;
}