projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
950bbc8
)
Avoid treating compressed MTU probes as having a negative length.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 23 Jun 2018 20:26:12 +0000
(22:26 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 23 Jun 2018 20:26:12 +0000
(22:26 +0200)
This was not harmful, but caused negative values being logged.
src/net_packet.c
patch
|
blob
|
history
diff --git
a/src/net_packet.c
b/src/net_packet.c
index ebf2938acb8bc826f2dd517d37b700f0a41718bf..9baaf4c8be4854bbe4bd3f1f7d1738fd46a2383e 100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-462,7
+462,10
@@
static bool receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
inpkt = outpkt;
- origlen -= MTU / 64 + 20;
+ if (origlen > MTU / 64 + 20)
+ origlen -= MTU / 64 + 20;
+ else
+ origlen = 0;
}
if(inpkt->len > n->maxrecentlen) {