projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5140656
)
Only use broadcast at the start of the PMTU discovery phase.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 26 Feb 2012 15:23:02 +0000
(16:23 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 26 Feb 2012 15:23:02 +0000
(16:23 +0100)
For local peer discovery, only a handful of packets are necessary for
peers to detect each other.
src/net_packet.c
patch
|
blob
|
history
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
18a898d
..
4b3496d
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-138,7
+138,10
@@
void send_mtu_probe(node_t *n) {
memset(packet.data, 0, 14);
RAND_pseudo_bytes(packet.data + 14, len - 14);
packet.len = len;
- packet.priority = i < 3 ? 0 : -1;
+ if(i >= 3 && n->mtuprobes <= 10)
+ packet.priority = -1;
+ else
+ packet.priority = 0;
ifdebug(TRAFFIC) logger(LOG_INFO, "Sending MTU probe length %d to %s (%s)", len, n->name, n->hostname);