projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79b6adb
)
Send the size of the largest recently received packets in type 2 probe replies.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 11 Jan 2015 15:14:05 +0000
(16:14 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 11 Jan 2015 15:14:05 +0000
(16:14 +0100)
src/net_packet.c
patch
|
blob
|
history
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
52c46e1
..
16f8e5e
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-114,7
+114,8
@@
static void send_udp_probe_reply(node_t *n, vpn_packet_t *packet, length_t len)
if ((n->options >> 24) >= 3) {
uint8_t *data = DATA(packet);
*data++ = 2;
- uint16_t len16 = htons(len);
+ uint16_t len16 = htons(MAX(len, n->maxrecentlen));
+ n->maxrecentlen = 0;
memcpy(data, &len16, 2);
packet->len = MIN_PROBE_SIZE;
} else {