Send the size of the largest recently received packets in type 2 probe replies.
This commit is contained in:
parent
79b6adb489
commit
7b76b7ac35
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
if ((n->options >> 24) >= 3) {
|
||||||
uint8_t *data = DATA(packet);
|
uint8_t *data = DATA(packet);
|
||||||
*data++ = 2;
|
*data++ = 2;
|
||||||
uint16_t len16 = htons(len);
|
uint16_t len16 = htons(MAX(len, n->maxrecentlen));
|
||||||
|
n->maxrecentlen = 0;
|
||||||
memcpy(data, &len16, 2);
|
memcpy(data, &len16, 2);
|
||||||
packet->len = MIN_PROBE_SIZE;
|
packet->len = MIN_PROBE_SIZE;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue