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:
14abf17
)
Fix segfault when dest->mtu is 0.
author
Werner Schreiber
<werner@perfect-privacy.com>
Wed, 10 Oct 2018 17:16:59 +0000
(19:16 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 11 Oct 2018 18:41:56 +0000
(20:41 +0200)
src/route.c
patch
|
blob
|
history
diff --git
a/src/route.c
b/src/route.c
index 850a146e496cf3d45ad5a730756e1b3f467185f8..f8b11bb6be7bcf405ec1a3ee7adfefa6f09cb57c 100644
(file)
--- a/
src/route.c
+++ b/
src/route.c
@@
-581,7
+581,7
@@
static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet, length_t et
ifdebug(TRAFFIC) logger(LOG_INFO, "Fragmenting packet of %d bytes to %s (%s)", packet->len, dest->name, dest->hostname);
offset = packet->data + ether_size + ip_size;
- maxlen = (
dest->mtu
- ether_size - ip_size) & ~0x7;
+ maxlen = (
MAX(dest->mtu, 590)
- ether_size - ip_size) & ~0x7;
ip_off = ntohs(ip.ip_off);
origf = ip_off & ~IP_OFFMASK;
ip_off &= IP_OFFMASK;