projects
/
meshlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1da502
)
Only add confirmed reflexive UDP addresses to ANS_KEY messages.
author
Guus Sliepen
<guus@meshlink.io>
Thu, 31 Oct 2019 18:44:27 +0000
(19:44 +0100)
committer
Guus Sliepen
<guus@meshlink.io>
Thu, 31 Oct 2019 18:44:27 +0000
(19:44 +0100)
src/protocol_key.c
patch
|
blob
|
history
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index 9f69d803b6800c7f314f1ff7df17c40a49485093..1d708e4a3bb2fc3b70a6468f446c5a6f04aac307 100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.c
@@
-324,7
+324,8
@@
bool ans_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
return true;
}
- if(!*address && from->address.sa.sa_family != AF_UNSPEC) {
+ /* Append the known UDP address of the from node, if we have a confirmed one */
+ if(!*address && from->status.udp_confirmed && from->address.sa.sa_family != AF_UNSPEC) {
char *address, *port;
logger(mesh, MESHLINK_DEBUG, "Appending reflexive UDP address to ANS_KEY from %s to %s", from->name, to->name);
sockaddr2str(&from->address, &address, &port);