projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 1.1
[tinc]
/
src
/
protocol_key.c
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index
52666d9
..
3cf4ab1
100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.c
@@
-1,7
+1,7
@@
/*
protocol_key.c -- handle the meta-protocol, key exchange
Copyright (C) 1999-2005 Ivo Timmermans,
/*
protocol_key.c -- handle the meta-protocol, key exchange
Copyright (C) 1999-2005 Ivo Timmermans,
- 2000-200
6
Guus Sliepen <guus@tinc-vpn.org>
+ 2000-200
9
Guus Sliepen <guus@tinc-vpn.org>
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
@@
-122,12
+122,18
@@
bool req_key_h(connection_t *c, char *request) {
if(to == myself) { /* Yes, send our own key back */
mykeyused = true;
from->received_seqno = 0;
if(to == myself) { /* Yes, send our own key back */
mykeyused = true;
from->received_seqno = 0;
- memset(from->late, 0, sizeof
(from->late)
);
+ memset(from->late, 0, sizeof
from->late
);
send_ans_key(c, myself, from);
} else {
if(tunnelserver)
return false;
send_ans_key(c, myself, from);
} else {
if(tunnelserver)
return false;
+ if(!to->status.reachable) {
+ logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"),
+ "REQ_KEY", c->name, c->hostname, to_name);
+ return true;
+ }
+
send_req_key(to->nexthop->connection, from, to);
}
send_req_key(to->nexthop->connection, from, to);
}
@@
-190,6
+196,12
@@
bool ans_key_h(connection_t *c, char *request) {
if(tunnelserver)
return false;
if(tunnelserver)
return false;
+ if(!to->status.reachable) {
+ logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"),
+ "ANS_KEY", c->name, c->hostname, to_name);
+ return true;
+ }
+
return send_request(to->nexthop->connection, "%s", request);
}
return send_request(to->nexthop->connection, "%s", request);
}
@@
-236,7
+248,5
@@
bool ans_key_h(connection_t *c, char *request) {
if(from->options & OPTION_PMTU_DISCOVERY && !from->mtuprobes)
send_mtu_probe(from);
if(from->options & OPTION_PMTU_DISCOVERY && !from->mtuprobes)
send_mtu_probe(from);
- flush_queue(from);
-
return true;
}
return true;
}