projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure outgoing_t is completely freed.
[tinc]
/
src
/
protocol_key.c
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index
66c9a90
..
786a8a1
100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.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: protocol_key.c,v 1.1.4.1
3 2002/09/09 21:24:5
6 guus Exp $
+ $Id: protocol_key.c,v 1.1.4.1
5 2003/04/18 21:18:3
6 guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-45,7
+45,7
@@
int mykeyused = 0;
int mykeyused = 0;
-int send_key_changed(connection_t *
c, node_t *
n)
+int send_key_changed(connection_t *
c, node_t *
n)
{
cp();
{
cp();
@@
-59,7
+59,7
@@
int send_key_changed(connection_t * c, node_t * n)
return send_request(c, "%d %lx %s", KEY_CHANGED, random(), n->name);
}
return send_request(c, "%d %lx %s", KEY_CHANGED, random(), n->name);
}
-int key_changed_h(connection_t *
c)
+int key_changed_h(connection_t *c)
{
char name[MAX_STRING_SIZE];
node_t *n;
{
char name[MAX_STRING_SIZE];
node_t *n;
@@
-93,14
+93,14
@@
int key_changed_h(connection_t * c)
return 0;
}
return 0;
}
-int send_req_key(connection_t *
c, node_t * from, node_t *
to)
+int send_req_key(connection_t *
c, node_t *from, node_t *
to)
{
cp();
return send_request(c, "%d %s %s", REQ_KEY, from->name, to->name);
}
{
cp();
return send_request(c, "%d %s %s", REQ_KEY, from->name, to->name);
}
-int req_key_h(connection_t *
c)
+int req_key_h(connection_t *c)
{
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];
{
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];
@@
-135,6
+135,7
@@
int req_key_h(connection_t * c)
if(to == myself) { /* Yes, send our own key back */
mykeyused = 1;
from->received_seqno = 0;
if(to == myself) { /* Yes, send our own key back */
mykeyused = 1;
from->received_seqno = 0;
+ memset(from->late, 0, sizeof(from->late));
send_ans_key(c, myself, from);
} else {
send_req_key(to->nexthop->connection, from, to);
send_ans_key(c, myself, from);
} else {
send_req_key(to->nexthop->connection, from, to);
@@
-143,7
+144,7
@@
int req_key_h(connection_t * c)
return 0;
}
return 0;
}
-int send_ans_key(connection_t *
c, node_t * from, node_t *
to)
+int send_ans_key(connection_t *
c, node_t *from, node_t *
to)
{
char key[MAX_STRING_SIZE];
{
char key[MAX_STRING_SIZE];
@@
-159,7
+160,7
@@
int send_ans_key(connection_t * c, node_t * from, node_t * to)
from->compression);
}
from->compression);
}
-int ans_key_h(connection_t *
c)
+int ans_key_h(connection_t *c)
{
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];
{
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];